import { SUB_FULL } from '@/fragments/subs' import errorStyles from '@/styles/error.module.css' import { useLazyQuery } from '@apollo/client' import classNames from 'classnames' import HoverablePopover from './hoverable-popover' import { TerritoryInfo, TerritoryInfoSkeleton } from './territory-header' import { truncateString } from '@/lib/format' export default function SubPopover ({ sub, children }) { const [getSub, { loading, data }] = useLazyQuery( SUB_FULL, { variables: { sub }, fetchPolicy: 'cache-first' } ) return ( : !data.sub ?

SUB NOT FOUND

: } /> ) }