import { useRouter } from 'next/router' import { Link } from 'components/Link' import { Notice } from './Notice' import { useTranslation } from 'components/hooks/useTranslation' import { FieldT } from './types' type Props = { fields: FieldT[] } export function Table({ fields }: Props) { const { locale } = useRouter() const { t } = useTranslation('products') const tableName = t('graphql.reference.name') const tableDescription = t('graphql.reference.description') return (
| {tableName} | {tableDescription} |
|---|---|
|
|
{field.description ? (
) : (
'N/A'
)}
{field.defaultValue !== undefined && (
The default value is {t('graphql.reference.arguments')}{field.arguments.map((argument, index) => (
|