Skip to content

Commit 334ca48

Browse files
committed
feat: add dashboard layout components with theme toggle and navigation sidebar
1 parent 30a611b commit 334ca48

File tree

3 files changed

+8
-14
lines changed

3 files changed

+8
-14
lines changed

frontend-nextjs/src/components/app-sidebar.tsx

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import { Home, Package, Settings, Shield, Search } from "lucide-react"
44
import Link from "next/link"
55
import { usePathname } from "next/navigation"
6-
import Image from "next/image"
76
import {
87
Sidebar,
98
SidebarContent,
@@ -51,16 +50,11 @@ export function AppSidebar() {
5150
<Sidebar className="border-r bg-white dark:bg-slate-900">
5251
<SidebarHeader className="p-6">
5352
<Link href="/dashboard" className="flex items-center space-x-3">
54-
<div className="w-8 h-8 flex items-center justify-center">
55-
<Image
56-
src="/assets/images/fastapi-logo.svg"
57-
alt="FastAPI Logo"
58-
width={32}
59-
height={32}
60-
className="w-8 h-8"
61-
priority
62-
/>
63-
</div>
53+
<img
54+
src="/assets/images/fastapi-logo.svg"
55+
alt="FastAPI Logo"
56+
style={{ width: "80%", height: "auto" }}
57+
/>
6458
</Link>
6559
</SidebarHeader>
6660
<SidebarContent>

frontend-nextjs/src/components/dashboard-header.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ export function DashboardHeader() {
3636
<SidebarTrigger />
3737
</div>
3838

39-
<div className="flex items-center space-x-4">
39+
<div className="flex items-center">
4040
<ThemeToggle />
4141
<DropdownMenu>
4242
<DropdownMenuTrigger asChild>
43-
<Button variant="ghost" className="relative h-8 w-8 rounded-full">
43+
<Button variant="ghost" className="relative rounded-full">
4444
<div className="h-8 w-8 rounded-full bg-teal-600 flex items-center justify-center">
4545
<User className="h-4 w-4 text-white" />
4646
</div>

frontend-nextjs/src/components/theme-toggle.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export function ThemeToggle() {
88
const { theme, setTheme } = useTheme()
99

1010
return (
11-
<Button variant="ghost" size="icon" onClick={() => setTheme(theme === "light" ? "dark" : "light")}>
11+
<Button variant="ghost" size="icon" onClick={() => setTheme(theme === "light" ? "dark" : "light")} className="rounded-full">
1212
<Sun className="h-4 w-4 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0" />
1313
<Moon className="absolute h-4 w-4 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100" />
1414
<span className="sr-only">Toggle theme</span>

0 commit comments

Comments
 (0)