diff --git a/app/[locale]/(default)/_components/header/index.tsx b/app/[locale]/(default)/_components/header/index.tsx index 0d88b85..9ae72b6 100644 --- a/app/[locale]/(default)/_components/header/index.tsx +++ b/app/[locale]/(default)/_components/header/index.tsx @@ -1,65 +1,30 @@ "use client"; -import { - Bell, - CircleUser, - Home, - LineChart, - Menu, - Package, - Package2, - Search, - ShoppingCart, - Users, -} from "lucide-react"; -import { - Card, - CardContent, - CardDescription, - CardHeader, - CardTitle, -} from "@/components/ui/card"; -import { - DropdownMenu, - DropdownMenuContent, - DropdownMenuItem, - DropdownMenuLabel, - DropdownMenuSeparator, - DropdownMenuTrigger, -} from "@/components/ui/dropdown-menu"; import { Sheet, SheetContent, SheetTrigger } from "@/components/ui/sheet"; -import { AppContext } from "@/contexts/app"; -import { Badge } from "@/components/ui/badge"; import { Button } from "@/components/ui/button"; -import { Input } from "@/components/ui/input"; import Link from "next/link"; import Locales from "../locales"; -import { Nav } from "@/types/nav"; -import { ReactNode } from "react"; +import { Menu } from "lucide-react"; import Sidenav from "../sidenav"; import Sidepanel from "../sidepanel"; -import Social from "../social"; import Theme from "../theme"; import User from "../user"; -import { useContext } from "react"; -import { usePathname } from "next/navigation"; +import { useAppContext } from "@/contexts/app"; export default function () { - const { user } = useContext(AppContext); - const pathname = usePathname(); - const navigations: Nav[] = []; + const { isSiderOpen, setIsSiderOpen } = useAppContext(); return (
- + @@ -74,7 +39,9 @@ export default function () {
- Melodisco + + Melodisco +
diff --git a/app/[locale]/(default)/_components/sidenav/index.tsx b/app/[locale]/(default)/_components/sidenav/index.tsx index 6e985e2..2596ff8 100644 --- a/app/[locale]/(default)/_components/sidenav/index.tsx +++ b/app/[locale]/(default)/_components/sidenav/index.tsx @@ -13,13 +13,13 @@ import { usePathname, useRouter } from "next/navigation"; import { Button } from "@/components/ui/button"; import { Nav } from "@/types/nav"; import { PiPlaylistDuotone } from "react-icons/pi"; -import { Playlist } from "../../_data/playlists"; -import { ScrollArea } from "@/components/ui/scroll-area"; -import { cn } from "@/lib/utils"; +import { useAppContext } from "@/contexts/app"; import { useTranslations } from "next-intl"; export default function () { const t = useTranslations("nav"); + + const { setIsSiderOpen } = useAppContext(); const router = useRouter(); const pathname = usePathname(); const musicNavs: Nav[] = [ @@ -83,12 +83,13 @@ export default function () {