mirror of
https://github.com/Radiquum/AniX.git
synced 2025-09-06 06:23:53 +05:00
anix/refactor: navbar
This commit is contained in:
parent
48345244f3
commit
6b84a312f7
11 changed files with 332 additions and 374 deletions
12
app/App.tsx
12
app/App.tsx
|
@ -1,7 +1,6 @@
|
|||
"use client";
|
||||
import { useUserStore } from "./store/auth";
|
||||
import { usePreferencesStore } from "./store/preferences";
|
||||
import { Navbar } from "./components/Navbar/NavbarUpdate";
|
||||
import { Inter } from "next/font/google";
|
||||
import { useEffect, useState } from "react";
|
||||
import {
|
||||
|
@ -14,6 +13,9 @@ import {
|
|||
import { Spinner } from "./components/Spinner/Spinner";
|
||||
import { ChangelogModal } from "#/components/ChangelogModal/ChangelogModal";
|
||||
import { Bounce, ToastContainer } from "react-toastify";
|
||||
import { NavBarPc } from "./components/Navbar/NavBarPc";
|
||||
import { NavBarMobile } from "./components/Navbar/NavBarMobile";
|
||||
import { SettingsModal } from "./components/SettingsModal/SettingsModal";
|
||||
|
||||
const inter = Inter({ subsets: ["latin"] });
|
||||
|
||||
|
@ -23,6 +25,7 @@ export const App = (props) => {
|
|||
const [showChangelog, setShowChangelog] = useState(false);
|
||||
const [currentVersion, setCurrentVersion] = useState("");
|
||||
const [previousVersions, setPreviousVersions] = useState([]);
|
||||
const [isSettingModalOpen, setIsSettingModalOpen] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
async function _checkVersion() {
|
||||
|
@ -68,7 +71,7 @@ export const App = (props) => {
|
|||
<body
|
||||
className={`${inter.className} overflow-x-hidden dark:bg-[#0d1117] dark:text-white`}
|
||||
>
|
||||
<Navbar />
|
||||
<NavBarPc setIsSettingModalOpen={setIsSettingModalOpen} />
|
||||
<main className="container px-2 pt-4 pb-24 mx-auto sm:pb-0">
|
||||
{props.children}
|
||||
</main>
|
||||
|
@ -123,6 +126,11 @@ export const App = (props) => {
|
|||
theme="colored"
|
||||
transition={Bounce}
|
||||
/>
|
||||
<NavBarMobile setIsSettingModalOpen={setIsSettingModalOpen} />
|
||||
<SettingsModal
|
||||
isOpen={isSettingModalOpen}
|
||||
setIsOpen={setIsSettingModalOpen}
|
||||
/>
|
||||
</body>
|
||||
);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue