import { ComponentProps, FC } from 'react' import { FormattedMessage, IntlShape } from 'react-intl' import { useMessages } from '../../../src/i18n' import { FormatXMLElementFn, PrimitiveType } from 'intl-messageformat' interface Props extends ComponentProps { id: keyof ReturnType['en'] } export const I18n: FC = ({ children, ...props }) => { return {children} } export const i18n = ( intl: IntlShape, id: keyof ReturnType['en'], values?: Record> ) => { return intl.formatMessage({ id }, values, { ignoreTag: true }) }