Added internationalization
This commit is contained in:
11
components/shared/I18n/I18n.tsx
Normal file
11
components/shared/I18n/I18n.tsx
Normal file
@@ -0,0 +1,11 @@
|
||||
import { FC } from 'react'
|
||||
import { FormattedMessage } from 'react-intl'
|
||||
import { useMessages } from '../../../src/i18n'
|
||||
|
||||
interface Props {
|
||||
id: keyof ReturnType<typeof useMessages>['en']
|
||||
}
|
||||
|
||||
export const I18n: FC<Props> = ({ id }) => {
|
||||
return <FormattedMessage id={id} />
|
||||
}
|
||||
Reference in New Issue
Block a user