mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-04-25 07:32:19 -05:00
* Initial * CSS lint * Test CI * Add 1v1, 2v2, and 3v3 Tags (#1771) * Initial * CSS lint * Test CI * Rename step --------- Co-authored-by: xi <104683822+ximk@users.noreply.github.com>
24 lines
590 B
TypeScript
24 lines
590 B
TypeScript
import { RemixBrowser } from "@remix-run/react";
|
|
import i18next from "i18next";
|
|
import { hydrateRoot } from "react-dom/client";
|
|
import { I18nextProvider } from "react-i18next";
|
|
import { i18nLoader } from "./modules/i18n/loader";
|
|
|
|
if ("serviceWorker" in navigator) {
|
|
window.addEventListener("load", () => {
|
|
// we will register it after the page complete the load
|
|
void navigator.serviceWorker.register("/sw.js");
|
|
});
|
|
}
|
|
|
|
i18nLoader()
|
|
.then(() =>
|
|
hydrateRoot(
|
|
document,
|
|
<I18nextProvider i18n={i18next}>
|
|
<RemixBrowser />
|
|
</I18nextProvider>,
|
|
),
|
|
)
|
|
.catch(console.error);
|