initial commit
This commit is contained in:
29
src/dashboard/entry.tsx
Normal file
29
src/dashboard/entry.tsx
Normal file
@@ -0,0 +1,29 @@
|
||||
/**
|
||||
* 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 { StrictMode } from "react"
|
||||
import { createRoot } from "react-dom/client"
|
||||
import { App } from "./dashboard"
|
||||
import { ThemeProvider } from "@/components/theme-provider"
|
||||
|
||||
const elem = document.getElementById("root")!
|
||||
const app = (
|
||||
<StrictMode>
|
||||
<ThemeProvider defaultTheme="system" storageKey="fileone-ui-theme">
|
||||
<App />
|
||||
</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)
|
||||
}
|
Reference in New Issue
Block a user