import { gql, useQuery } from '@apollo/client' import Link from 'next/link' import { RewardLine } from '../pages/rewards' const REWARDS = gql` { expectedRewards { total } }` export default function Rewards () { const { data } = useQuery(REWARDS, { pollInterval: 60000, fetchPolicy: 'cache-and-network' }) const total = data?.expectedRewards?.total return ( {total ? : 'rewards'} ) }