mirror of
https://github.com/Radiquum/AniX.git
synced 2025-05-03 03:19:41 +05:00
frontend: add color theme & theme switcher
This commit is contained in:
parent
84b13a2c80
commit
b8878c4fb8
7 changed files with 192 additions and 19 deletions
21
frontend/app/App.jsx
Normal file
21
frontend/app/App.jsx
Normal file
|
@ -0,0 +1,21 @@
|
|||
"use client";
|
||||
|
||||
import { NavigationRail } from "@/app/components/NavigationRail/NavigationRail";
|
||||
import { useThemeStore } from "./store/theme-store";
|
||||
import { useEffect } from "react";
|
||||
// import { useStore } from "./store/app-store";
|
||||
|
||||
export const App = (props) => {
|
||||
const themeStore = useThemeStore();
|
||||
|
||||
useEffect(() => {
|
||||
themeStore.checkTheme();
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<body className={themeStore.theme}>
|
||||
<NavigationRail />
|
||||
<main className="responsive">{props.children}</main>
|
||||
</body>
|
||||
);
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue