import { gql, useQuery } from '@apollo/client' import Link from 'next/link' import { RewardLine } from '@/pages/rewards' import { SSR } from '@/lib/constants' const REWARDS = gql` { rewards { total time } }` export default function Rewards () { const { data } = useQuery(REWARDS, SSR ? { ssr: false } : { pollInterval: 60000, nextFetchPolicy: 'cache-and-network' }) const total = data?.rewards?.[0]?.total const time = data?.rewards?.[0]?.time return ( {total ? : 'rewards'} ) }