1
This commit is contained in:
@@ -87,14 +87,16 @@ const NavTabs = () => {
|
||||
const pathname = usePathname();
|
||||
const tabs = [
|
||||
{href: "/dashboard", label: "Dashboard", icon: LayoutGrid},
|
||||
{href: "/dashboard/settings", label: "Settings", icon: SettingsIcon},
|
||||
{href: "/dashboard/setting", label: "Settings", icon: SettingsIcon},
|
||||
{href: "/dashboard/billing", label: "Billing", icon: CreditCard},
|
||||
];
|
||||
return (
|
||||
<nav className="flex items-center gap-0.5" aria-label="Dashboard navigation">
|
||||
{tabs.map(item => {
|
||||
const Icon = item.icon;
|
||||
const isActive = pathname == item.href;
|
||||
const isActive = item.href === "/dashboard"
|
||||
? pathname === item.href
|
||||
: pathname === item.href || pathname.startsWith(`${item.href}/`);
|
||||
|
||||
return (
|
||||
<Link
|
||||
|
||||
Reference in New Issue
Block a user