forked from lingui/js-lingui
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.tsx
More file actions
26 lines (22 loc) · 661 Bytes
/
main.tsx
File metadata and controls
26 lines (22 loc) · 661 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import React from "react";
import { i18n, } from "@lingui/core";
import { createRoot } from "react-dom/client";
import { I18nProvider } from "@lingui/react";
import Inbox from "./Inbox";
import { dynamicActivate } from "./i18n";
import Locale from "./locales";
const container = document.getElementById("root");
const root = createRoot(container!);
void dynamicActivate(i18n, Locale.ENGLISH)
.then(() => {
root.render(
<React.StrictMode>
<I18nProvider i18n={i18n}>
<Inbox />
</I18nProvider>
</React.StrictMode>,
);
})
.catch((error) => {
console.error("Failed to load initial catalog.", error);
});