Skip to content

Commit

Permalink
chore: update sidebar items, dashboard layout, and style improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
arhamkhnz committed Nov 10, 2024
1 parent 2e61794 commit 5c2c9b8
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion src/app/dashboard/components/sidebar/sidebarNavigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export default function SidebarNavigation({ sidebarItems }: { readonly sidebarIt
{item.subItems.map((subItem) => (
<SidebarMenuSubItem key={subItem.title}>
<SidebarMenuSubButton asChild>
<a href={subItem.url}>
<a href={subItem.path}>
<span>{subItem.title}</span>
</a>
</SidebarMenuSubButton>
Expand Down
2 changes: 1 addition & 1 deletion src/app/dashboard/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default function Layout({ children }: LayoutProps) {
<main>
<SidebarProvider>
<AppSidebar />
<SidebarInset>
<SidebarInset className="mx-auto max-w-screen-2xl">
<header className="flex h-16 shrink-0 items-center gap-2 transition-[width,height] ease-linear group-has-[[data-collapsible=icon]]/sidebar-wrapper:h-12">
<div className="flex items-center gap-2 px-4">
<SidebarTrigger className="-ml-1" />
Expand Down
4 changes: 2 additions & 2 deletions src/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@
--sidebar-foreground: 240 5.3% 26.1%;
--sidebar-primary: 240 5.9% 10%;
--sidebar-primary-foreground: 0 0% 98%;
--sidebar-accent: 240 4.8% 95.9%;
--sidebar-accent: 45.88 100% 50%;
--sidebar-accent-foreground: 240 5.9% 10%;
--sidebar-border: 220 13% 91%;
--sidebar-ring: 217.2 91.2% 59.8%;
--sidebar-ring: 45.88 100% 50%;
}

.dark {
Expand Down
32 changes: 16 additions & 16 deletions src/navigation/sidebar/sidebarItems.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { File, Inbox, Send, Receipt, LucideIcon, PanelsTopLeft } from "lucide-react"
import { File, Inbox, Send, Receipt, KeySquare, LucideIcon, PanelsTopLeft } from "lucide-react"

export interface NavSubItem {
title: string
url: string
path: string
}

export interface NavMainItem {
title: string
url: string
path: string
icon?: LucideIcon
isActive?: boolean
subItems?: NavSubItem[]
Expand All @@ -28,7 +28,7 @@ export const sidebarItems: NavGroup[] = [
items: [
{
title: "Dashboard",
url: basePath,
path: basePath,
icon: PanelsTopLeft,
isActive: true,
},
Expand All @@ -40,34 +40,34 @@ export const sidebarItems: NavGroup[] = [
items: [
{
title: "Inbox",
url: `${basePath}/inbox`,
path: `${basePath}/inbox`,
icon: Inbox,
},
{
title: "Invoice",
url: "#",
path: "#",
icon: Receipt,
subItems: [
{ title: "List", url: `${basePath}/invoice/list-preview` },
{ title: "View", url: `${basePath}/invoice/view` },
{ title: "Add", url: `${basePath}/invoice/add` },
{ title: "Edit", url: `${basePath}/invoice/edit` },
{ title: "List", path: `${basePath}/invoice/list-preview` },
{ title: "View", path: `${basePath}/invoice/view` },
{ title: "Add", path: `${basePath}/invoice/add` },
{ title: "Edit", path: `${basePath}/invoice/edit` },
],
},
{
title: "Auth",
url: "#",
icon: Receipt,
subItems: [{ title: "Unauthorized", url: `${basePath}/auth/unauthorized` }],
path: "#",
icon: KeySquare,
subItems: [{ title: "Unauthorized", path: `${basePath}/auth/unauthorized` }],
},
{
title: "Drafts",
url: `${basePath}/drafts`,
path: `${basePath}/drafts`,
icon: File,
},
{
title: "Sent",
url: `${basePath}/sent`,
path: `${basePath}/sent`,
icon: Send,
},
],
Expand All @@ -78,7 +78,7 @@ export const sidebarItems: NavGroup[] = [
items: [
{
title: "Billing",
url: `${basePath}/billing`,
path: `${basePath}/billing`,
icon: Receipt,
},
],
Expand Down

0 comments on commit 5c2c9b8

Please sign in to comment.