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

{heading}

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