Skip to content

Commit

Permalink
fix: types for sheet nav
Browse files Browse the repository at this point in the history
  • Loading branch information
mickasmt committed Sep 16, 2023
1 parent 321b7a7 commit d95a018
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 11 deletions.
1 change: 1 addition & 0 deletions src/components/layout/sheet-mobile-nav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ export function SheetMobileNav() {
{subItem.href ? (
<a
href={subItem.href}
target={subItem?.external ? "_blank" : undefined}
className="text-muted-foreground"
>
{subItem.title}
Expand Down
10 changes: 1 addition & 9 deletions src/components/main-navigation-menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,7 @@ import {
} from "@/components/ui/navigation-menu";
import { Badge } from "@/components/ui/badge";
import { navMenuConfig } from "@/config/nav-menu";

type MenuItem = {
title: string;
href: string;
description: string;
launched?: boolean;
disabled?: boolean;
external?: boolean;
};
import type { MenuItem } from "@/types";

const infos = navMenuConfig.infosNav[0];
const examples = navMenuConfig.examplesNav[0];
Expand Down
4 changes: 2 additions & 2 deletions src/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export type NavItem = {
disabled?: boolean;
};
export type MenuItem = NavItem & {
description: string;
description?: string;
launched?: boolean;
external?: boolean;
};
Expand All @@ -24,7 +24,7 @@ export type SidebarNavItem = {
}
| {
href?: string;
items: NavLink[];
items: MenuItem[];
}
);

Expand Down

0 comments on commit d95a018

Please sign in to comment.