Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions src/components/app-sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,14 @@ const data = {
navSecondary: [
{
title: "Settings",
url: "#",
icon: SettingsIcon,
},
{
title: "Help",
url: "#",
icon: HelpCircleIcon,
},
{
title: "Search",
url: "#",
icon: SearchIcon,
},
],
Expand Down
35 changes: 25 additions & 10 deletions src/components/nav-secondary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export function NavSecondary({
}: {
items: {
title: string;
url: string;
url?: string;
icon: LucideIcon;
}[];
} & React.ComponentPropsWithoutRef<typeof SidebarGroup>) {
Expand All @@ -35,15 +35,30 @@ export function NavSecondary({
<SidebarMenu>
{items.map((item) => (
<SidebarMenuItem key={item.title}>
<SidebarMenuButton
asChild
className="text-white hover:bg-white/10 hover:text-white"
>
<a href={item.url} onClick={handleLinkClick}>
<item.icon className="text-white" />
<span className="text-white">{item.title}</span>
</a>
</SidebarMenuButton>
{item.url ? (
<SidebarMenuButton
asChild
className="text-white hover:bg-white/10 hover:text-white"
>
<a href={item.url} onClick={handleLinkClick}>
<item.icon className="text-white" />
<span className="text-white">{item.title}</span>
</a>
</SidebarMenuButton>
) : (
<SidebarMenuButton
type="button"
disabled
aria-label={`${item.title} — Coming soon`}
className="text-white"
>
<item.icon aria-hidden="true" />
<span>{item.title}</span>
<span className="ml-auto text-xs group-data-[collapsible=icon]:hidden">
Coming soon
</span>
</SidebarMenuButton>
)}
</SidebarMenuItem>
))}
</SidebarMenu>
Expand Down