Skip to content

Commit 3adc8ea

Browse files
committed
top bar for mobile dashboard
1 parent d9e8508 commit 3adc8ea

File tree

5 files changed

+20
-22
lines changed

5 files changed

+20
-22
lines changed

src/components/interactive/Sidebar.tsx

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,10 @@
22

33
import * as React from "react";
44
import { cn } from "@/lib/utils";
5-
import {
6-
Home,
7-
FileText,
8-
ListChecks,
9-
Menu,
10-
LogOut,
11-
} from "lucide-react";
5+
import { Home, FileText, ListChecks, Menu, LogOut } from "lucide-react";
126
import { Button } from "@/components/ui/button";
137
import { ScrollArea } from "@/components/ui/scroll-area";
14-
import {
15-
Sheet,
16-
SheetContent,
17-
SheetTrigger,
18-
} from "@/components/ui/sheet";
8+
import { Sheet, SheetContent, SheetTrigger } from "@/components/ui/sheet";
199
import { KEYWORDS } from "@/constant";
2010

2111
type NavItem = {
@@ -34,7 +24,6 @@ const navItems: NavItem[] = [
3424

3525
function NavLink({ item, active }: { item: NavItem; active?: boolean }) {
3626
const Icon = item.icon;
37-
3827
return (
3928
<a
4029
href={item.href}
@@ -66,9 +55,9 @@ export function Sidebar() {
6655
};
6756

6857
return (
69-
<div className="flex">
70-
{/* Mobile: hamburger trigger */}
71-
<div className="lg:hidden p-2">
58+
<>
59+
{/* Mobile: Top bar with hamburger */}
60+
<div className="flex items-center justify-between px-4 py-3 bg-white border-b shadow-md lg:hidden">
7261
<Sheet>
7362
<SheetTrigger asChild>
7463
<Button variant="outline" size="icon">
@@ -94,6 +83,7 @@ export function Sidebar() {
9483
</ScrollArea>
9584
</SheetContent>
9685
</Sheet>
86+
<h1 className="text-lg font-semibold">Bounteer Dashboard</h1>
9787
</div>
9888

9989
{/* Desktop: persistent sidebar */}
@@ -116,6 +106,6 @@ export function Sidebar() {
116106
</nav>
117107
</ScrollArea>
118108
</aside>
119-
</div>
109+
</>
120110
);
121111
}

src/pages/dashboard/index.astro

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@ import { Sidebar } from "@/components/interactive/Sidebar";
55
import AuthGuard from "@/components/interactive/AuthGuard";
66
---
77

8-
<Layout title="Home - Bounteer">
8+
<Layout title="Dashboard - Bounteer">
99
<AuthGuard client:load>
10-
<main class="bg-gray-50 min-h-screen flex">
10+
<main class="bg-gray-50 min-h-screen flex flex-col lg:flex-row">
11+
<!-- Sidebar handles both mobile topbar + desktop sidebar -->
1112
<Sidebar client:load />
1213

14+
<!-- Main content -->
1315
<section class="flex-1 px-6 py-10">
1416
<div class="mb-6">
1517
<h1 class="text-2xl font-semibold tracking-tight">Dashboard</h1>

src/pages/dashboard/role-fit-index/index.astro

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@ const USER_ID = "51bad019-1d3b-4f7a-9a89-87355fbcde84";
1111

1212
<Layout title="Role Fit Index - Bounteer">
1313
<AuthGuard client:load>
14-
<main class="bg-gray-50 min-h-screen flex">
14+
<main class="bg-gray-50 min-h-screen flex flex-col lg:flex-row">
15+
<!-- Sidebar handles both mobile topbar + desktop sidebar -->
1516
<Sidebar client:load />
1617

18+
<!-- Main content -->
1719
<section class="flex-1 px-6 py-10">
1820
<div class="mb-6">
1921
<h1 class="text-2xl font-semibold tracking-tight">

src/pages/dashboard/role-fit-index/top-up/confirm.astro

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@ import AuthGuard from "@/components/interactive/AuthGuard";
88

99
<Layout title="Top Up Confirmation — Bounteer">
1010
<AuthGuard client:load>
11-
<main class="bg-gray-50 min-h-screen flex">
11+
<main class="bg-gray-50 min-h-screen flex flex-col lg:flex-row">
12+
<!-- Sidebar handles both mobile topbar + desktop sidebar -->
1213
<Sidebar client:load />
1314

15+
<!-- Main content -->
1416
<section class="flex-1 flex flex-col items-center justify-center px-6">
1517
<h1 class="text-2xl font-semibold tracking-tight mb-6 text-center">
1618
Payment confirmed, Thank you!

src/pages/dashboard/role-fit-index/top-up/index.astro

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@ import { EXTERNAL } from "@/constant";
1010

1111
<Layout title="Top Up Role Fit Index Credit — Bounteer">
1212
<AuthGuard client:load>
13-
<main class="bg-gray-50 min-h-screen flex">
13+
<main class="bg-gray-50 min-h-screen flex flex-col lg:flex-row">
14+
<!-- Sidebar handles both mobile topbar + desktop sidebar -->
1415
<Sidebar client:load />
1516

17+
<!-- Main content -->
1618
<section class="flex-1 px-6 py-10">
1719
<div class="mb-6">
1820
<h1 class="text-2xl font-semibold tracking-tight">

0 commit comments

Comments
 (0)