💄 create navigation in navbar
This commit is contained in:
7
app/(main)/explore/page.tsx
Normal file
7
app/(main)/explore/page.tsx
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
import React from "react";
|
||||||
|
|
||||||
|
const page = () => {
|
||||||
|
return <div>Explore Page</div>;
|
||||||
|
};
|
||||||
|
|
||||||
|
export default page;
|
||||||
@ -11,6 +11,7 @@ import {
|
|||||||
NavbarMenuItem,
|
NavbarMenuItem,
|
||||||
NavbarMenuToggle,
|
NavbarMenuToggle,
|
||||||
} from "@heroui/react";
|
} from "@heroui/react";
|
||||||
|
import { usePathname } from "next/navigation";
|
||||||
import React, { useState } from "react";
|
import React, { useState } from "react";
|
||||||
|
|
||||||
export const AcmeLogo = () => {
|
export const AcmeLogo = () => {
|
||||||
@ -27,6 +28,7 @@ export const AcmeLogo = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const NavbarUI = () => {
|
const NavbarUI = () => {
|
||||||
|
const pathNameNow = usePathname();
|
||||||
const [isMenuOpen, setIsMenuOpen] = useState(false);
|
const [isMenuOpen, setIsMenuOpen] = useState(false);
|
||||||
|
|
||||||
const navbarItems = [
|
const navbarItems = [
|
||||||
@ -35,16 +37,20 @@ const NavbarUI = () => {
|
|||||||
route: "/",
|
route: "/",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "Featured",
|
title: "Explore",
|
||||||
route: "/featured",
|
route: "/explore",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "Season",
|
title: "Trending",
|
||||||
route: "/season",
|
route: "/trending",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "Genres",
|
title: "Genres",
|
||||||
route: "/genres",
|
route: "/genre",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "Schedule",
|
||||||
|
route: "/schedule",
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -62,26 +68,20 @@ const NavbarUI = () => {
|
|||||||
</NavbarContent>
|
</NavbarContent>
|
||||||
|
|
||||||
<NavbarContent className="hidden sm:flex gap-6" justify="center">
|
<NavbarContent className="hidden sm:flex gap-6" justify="center">
|
||||||
<NavbarItem>
|
{navbarItems.map((item, index) => {
|
||||||
<Link color="foreground" href="#">
|
const isActive = item.route === pathNameNow;
|
||||||
Home
|
|
||||||
</Link>
|
return (
|
||||||
</NavbarItem>
|
<NavbarItem key={index} isActive={isActive}>
|
||||||
<NavbarItem isActive>
|
<Link
|
||||||
<Link aria-current="page" href="#">
|
color={isActive ? "primary" : "foreground"}
|
||||||
Explore
|
href={isActive ? "" : item.route}
|
||||||
</Link>
|
>
|
||||||
</NavbarItem>
|
{item.title}
|
||||||
<NavbarItem>
|
</Link>
|
||||||
<Link color="foreground" href="#">
|
</NavbarItem>
|
||||||
Trending
|
);
|
||||||
</Link>
|
})}
|
||||||
</NavbarItem>
|
|
||||||
<NavbarItem>
|
|
||||||
<Link color="foreground" href="#">
|
|
||||||
Schedule
|
|
||||||
</Link>
|
|
||||||
</NavbarItem>
|
|
||||||
</NavbarContent>
|
</NavbarContent>
|
||||||
<NavbarContent justify="end">
|
<NavbarContent justify="end">
|
||||||
<NavbarItem className="hidden lg:flex">
|
<NavbarItem className="hidden lg:flex">
|
||||||
|
|||||||
0
widgets/navbar/accountCenter.tsx
Normal file
0
widgets/navbar/accountCenter.tsx
Normal file
0
widgets/navbar/mobileSidebar.tsx
Normal file
0
widgets/navbar/mobileSidebar.tsx
Normal file
Reference in New Issue
Block a user