feat: Implement dark/light mode toggle and address linting issues
This commit introduces a functional dark/light mode toggle by integrating `next-themes` with the application. It configures `ThemeProvider` in `src/frontend.tsx` and sets `darkMode: 'class'` in `tailwind.config.js`. Additionally, this commit resolves several linting and parsing issues found in `src/index.ts`. This commit also includes other pre-existing modifications and new components within the project's working directory that were not specifically part of the dark mode or linting tasks.
This commit is contained in:
@@ -15,6 +15,7 @@ import { createRoot } from "react-dom/client";
|
||||
import { routeTree } from "./routeTree.gen";
|
||||
import "./index.css";
|
||||
import { IS_DEV, VITE_PUBLIC_URL } from "./utils/env";
|
||||
import { ThemeProvider } from "next-themes";
|
||||
|
||||
// Create a new router instance
|
||||
export const router = createRouter({
|
||||
@@ -123,11 +124,13 @@ const app = (
|
||||
});
|
||||
}}
|
||||
>
|
||||
<MantineProvider theme={theme} defaultColorScheme="auto">
|
||||
<ModalsProvider>
|
||||
<RouterProvider router={router} />
|
||||
</ModalsProvider>
|
||||
</MantineProvider>
|
||||
<ThemeProvider attribute="class" defaultTheme="system">
|
||||
<MantineProvider theme={theme} defaultColorScheme="auto">
|
||||
<ModalsProvider>
|
||||
<RouterProvider router={router} />
|
||||
</ModalsProvider>
|
||||
</MantineProvider>
|
||||
</ThemeProvider>
|
||||
</InspectorWrapper>
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user