refactor: convert to monorepo

Co-authored-by: Ona <no-reply@ona.com>
This commit is contained in:
2025-09-16 23:01:40 +00:00
parent 59e14a9c9a
commit 223a594479
46 changed files with 68 additions and 66 deletions

View File

@@ -0,0 +1,34 @@
/**
* This file is the entry point for the React app, it sets up the root
* element and renders the App component to the DOM.
*
* It is included in `src/index.html`.
*/
import { createRouter, RouterProvider } from "@tanstack/react-router"
import { StrictMode } from "react"
import { createRoot } from "react-dom/client"
import { ThemeProvider } from "@/components/theme-provider"
// Import the generated route tree
import { routeTree } from "./routeTree.gen"
// Create a new router instance
const router = createRouter({ routeTree })
const elem = document.getElementById("root")!
const app = (
<StrictMode>
<ThemeProvider defaultTheme="system" storageKey="fileone-ui-theme">
<RouterProvider router={router} />
</ThemeProvider>
</StrictMode>
)
if (import.meta.hot) {
// With hot module reloading, `import.meta.hot.data` is persisted.
const root = (import.meta.hot.data.root ??= createRoot(elem))
root.render(app)
} else {
// The hot module reloading API is not available in production.
createRoot(elem).render(app)
}