import { useTranslation } from 'components/hooks/useTranslation' import { StatusCode } from './types' type Props = { statusCodes: Array slug: string heading: string } export function RestStatusCodes({ statusCodes, slug, heading }: Props) { const { t } = useTranslation('products') return ( <>

{heading}

{statusCodes.map((statusCode, index) => ( ))}
{t('rest.reference.status_code')} {t('rest.reference.description')}
{statusCode.httpStatusCode} {statusCode.description ? (
) : ( statusCode.httpStatusMessage )}
) }