Skip to content

Commit da9f818

Browse files
fix: update Dashboard components for clarity and improve Navbar layout
1 parent 13d6a4a commit da9f818

File tree

3 files changed

+17
-9
lines changed

3 files changed

+17
-9
lines changed

app/dashboard/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ export default function Dashboard() {
115115
{userDetails.profile.realName}
116116
</h1>
117117
<p className="text-sm text-gray-600 dark:text-gray-400 mb-3">
118-
@{userDetails.username}Global Rank #{userDetails.profile.ranking}
118+
@{userDetails.username} • Rank #{userDetails.profile.ranking}
119119
</p>
120120
<div className="flex gap-4 justify-center md:justify-start">
121121
<SocialLink href={userDetails.githubUrl} icon={<Github size={20} />} />

components/dashboardComponents/DashboardNavbar.tsx

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,23 @@ export const DashboardNavbar = () => {
8282
</div>
8383

8484
{/* <!-- Desktop --> */}
85-
<div className="hidden lg:flex gap-2">
86-
<ToggleTheme />
87-
<Logout />
85+
<div className="flex gap-2">
86+
{SidebarData.map(({ href, title }) => (
87+
<Button
88+
key={href}
89+
onClick={() => setIsOpen(false)}
90+
asChild
91+
variant="ghost"
92+
className="justify-start text-base"
93+
>
94+
<Link href={href}>{title}</Link>
95+
</Button>
96+
))}
8897
</div>
98+
<div className="hidden lg:flex gap-2">
99+
<ToggleTheme />
100+
<Logout />
101+
</div>
89102
</header>
90103
);
91104
};

data/SidebarData.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,5 @@ export const SidebarData = [
1111
icon: BookA,
1212
href: "/dashboard/journal",
1313
},
14-
{
15-
title: "Settings",
16-
icon: Settings,
17-
href: "/dashboard/settings",
18-
},
1914
];
2015

0 commit comments

Comments
 (0)