2025-04-02 20:42:47 -03:00
|
|
|
"use client";
|
|
|
|
|
|
|
|
import { usePathname, useRouter } from 'next/navigation';
|
|
|
|
import { Button } from '../src/components/ui/button';
|
|
|
|
|
|
|
|
const examples = [
|
2025-04-18 23:11:10 -03:00
|
|
|
{ name: "Home", href: "/auth" },
|
2025-04-02 20:42:47 -03:00
|
|
|
{ name: "Dashboard", href: "/dashboard" },
|
|
|
|
{ name: "Chat", href: "/chat" },
|
|
|
|
{ name: "Mail", href: "/mail" },
|
2025-04-18 23:11:10 -03:00
|
|
|
{ name: "Tree", href: "/tree" },
|
|
|
|
{ name: "Editor", href: "/editor" },
|
|
|
|
{ name: "Tables", href: "/table" },
|
|
|
|
{ name: "Video", href: "/video" },
|
|
|
|
{ name: "Music", href: "/music" },
|
2025-04-02 20:42:47 -03:00
|
|
|
{ name: "Templates", href: "/templates" },
|
|
|
|
{ name: "Settings", href: "/sync" },
|
|
|
|
];
|
|
|
|
|
|
|
|
export function Nav() {
|
|
|
|
const pathname = usePathname();
|
|
|
|
const router = useRouter();
|
|
|
|
|
|
|
|
return (
|
|
|
|
<div className="examples-nav-container">
|
|
|
|
<div className="examples-nav-inner">
|
|
|
|
{examples.map((example) => (
|
|
|
|
<Button
|
|
|
|
key={example.href}
|
|
|
|
onClick={() => router.push(example.href)}
|
|
|
|
className={`example-button ${pathname === example.href ? 'active' : ''}`}
|
|
|
|
>
|
|
|
|
{example.name}
|
|
|
|
</Button>
|
|
|
|
))}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|