1
0
Fork 0
mirror of https://github.com/betagouv/mon-entreprise synced 2025-02-09 22:45:01 +00:00
mon-entreprise/site/source/entry-fr.tsx

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

27 lines
656 B
TypeScript
Raw Normal View History

import { I18nProvider } from '@react-aria/i18n'
2022-11-03 17:32:04 +01:00
import { withProfiler } from '@sentry/react'
2022-11-23 18:07:01 +01:00
import { createRoot } from 'react-dom/client'
2022-11-03 17:32:04 +01:00
2018-07-12 10:09:41 +02:00
import App from './App'
import i18next from './locales/i18n'
2022-11-03 17:32:04 +01:00
import './sentry'
export const AppFr = () => (
<I18nProvider locale="fr-FR">
2022-01-04 11:11:31 +01:00
<App basename="mon-entreprise" />
</I18nProvider>
)
2022-04-13 18:42:50 +02:00
const AppFrWithProfiler = withProfiler(AppFr)
if (!import.meta.env.SSR) {
2022-03-28 15:34:12 +02:00
i18next.changeLanguage('fr').catch((err) =>
// eslint-disable-next-line no-console
console.error(err)
)
2022-11-23 18:07:01 +01:00
const container = document.querySelector('#js') as Element
const root = createRoot(container)
root.render(<AppFrWithProfiler />)
}