import { useRouter } from 'next/router' import { Link } from 'components/Link' import { GraphqlItem } from './GraphqlItem' import { Table } from './Table' import { useTranslation } from 'components/hooks/useTranslation' import type { ObjectT, ImplementsT } from './types' type Props = { item: ObjectT } export function Object({ item }: Props) { const { locale } = useRouter() const { t } = useTranslation('products') const heading1 = t('graphql.reference.implements') const heading2 = t('graphql.reference.fields') return ( {item.implements && ( <>

{heading1}

)} {item.fields && ( <>

{heading2}

)} ) }