Initial Commit
This commit is contained in:
26
electron/src/App.tsx
Normal file
26
electron/src/App.tsx
Normal file
@@ -0,0 +1,26 @@
|
||||
import React, { useEffect } from "react";
|
||||
import { createRoot } from "react-dom/client";
|
||||
import { syncThemeWithLocal } from "./helpers/theme_helpers";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import "./localization/i18n";
|
||||
import { updateAppLanguage } from "./helpers/language_helpers";
|
||||
import { router } from "./routes/router";
|
||||
import { RouterProvider } from "@tanstack/react-router";
|
||||
|
||||
export default function App() {
|
||||
const { i18n } = useTranslation();
|
||||
|
||||
useEffect(() => {
|
||||
syncThemeWithLocal();
|
||||
updateAppLanguage(i18n);
|
||||
}, [i18n]);
|
||||
|
||||
return <RouterProvider router={router} />;
|
||||
}
|
||||
|
||||
const root = createRoot(document.getElementById("app")!);
|
||||
root.render(
|
||||
<React.StrictMode>
|
||||
<App />
|
||||
</React.StrictMode>,
|
||||
);
|
||||
Reference in New Issue
Block a user