From 5aec47c6172cbdc04874a287f154d21bfc529137 Mon Sep 17 00:00:00 2001 From: Sir Blob <76974209+GamerBoss101@users.noreply.github.com> Date: Sat, 25 Jan 2025 07:53:43 -0500 Subject: [PATCH] Buggy Code --- src/app/(panels)/layout.tsx | 2 +- .../suite/doctor/dashboard/layout.tsx | 15 --- .../(panels)/suite/doctor/dashboard/page.tsx | 103 ++---------------- src/app/(panels)/suite/doctor/layout.tsx | 27 +++-- src/components/panel-ui/doctor/app-navbar.tsx | 60 +++++----- .../panel-ui/doctor/app-sidebar.tsx | 70 ++++++------ 6 files changed, 98 insertions(+), 179 deletions(-) delete mode 100644 src/app/(panels)/suite/doctor/dashboard/layout.tsx diff --git a/src/app/(panels)/layout.tsx b/src/app/(panels)/layout.tsx index dd27b62..9c75548 100644 --- a/src/app/(panels)/layout.tsx +++ b/src/app/(panels)/layout.tsx @@ -13,7 +13,7 @@ export default function RootLayout({ -
{children}
+ {children}
diff --git a/src/app/(panels)/suite/doctor/dashboard/layout.tsx b/src/app/(panels)/suite/doctor/dashboard/layout.tsx deleted file mode 100644 index be5edea..0000000 --- a/src/app/(panels)/suite/doctor/dashboard/layout.tsx +++ /dev/null @@ -1,15 +0,0 @@ -"use client" - -import * as React from "react" - -export default function RootLayout({ - children, -}: { - children: React.ReactNode -}) { - return ( -
- {children} -
- ) -} diff --git a/src/app/(panels)/suite/doctor/dashboard/page.tsx b/src/app/(panels)/suite/doctor/dashboard/page.tsx index 19ffad8..97dd76f 100644 --- a/src/app/(panels)/suite/doctor/dashboard/page.tsx +++ b/src/app/(panels)/suite/doctor/dashboard/page.tsx @@ -1,97 +1,16 @@ -import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card" +"use client" -export default function DashboardPage() { +export default function Dashboard() { return ( -
-

Dashboard Overview

-
- - - Total Revenue - - - - - -
$45,231.89
-

+20.1% from last month

-
-
- - - Subscriptions - - - - - - - -
+2350
-

+180.1% from last month

-
-
- - - Sales - - - - - - -
+12,234
-

+19% from last month

-
-
- - - Active Now - - - - - -
+573
-

+201 since last hour

-
-
+
+

Dashboard

+
+ {[...Array(6)].map((_, i) => ( +
+

Card {i + 1}

+

This is some placeholder content for Card {i + 1}.

+
+ ))}
) diff --git a/src/app/(panels)/suite/doctor/layout.tsx b/src/app/(panels)/suite/doctor/layout.tsx index 13a0ade..6c39b7d 100644 --- a/src/app/(panels)/suite/doctor/layout.tsx +++ b/src/app/(panels)/suite/doctor/layout.tsx @@ -1,19 +1,26 @@ -import { Sidebar } from "@/components/panel-ui/doctor/app-sidebar" -import { Navbar } from "@/components/panel-ui/doctor/app-navbar" +"use client" -export default function DashboardLayout({ +import { useState } from "react" +import Sidebar from "@/components/panel-ui/doctor/app-sidebar" +import Navbar from "@/components/panel-ui/doctor/app-navbar" +import { SidebarProvider } from "@/components/ui/sidebar" + +export default function RootLayout({ children, }: { children: React.ReactNode }) { + const [isSidebarOpen, setIsSidebarOpen] = useState(true) + return ( -
- -
+ + +
-
{children}
+
+ {children} +
-
+ ) -} - +} \ No newline at end of file diff --git a/src/components/panel-ui/doctor/app-navbar.tsx b/src/components/panel-ui/doctor/app-navbar.tsx index 46dcfc6..3f848f3 100644 --- a/src/components/panel-ui/doctor/app-navbar.tsx +++ b/src/components/panel-ui/doctor/app-navbar.tsx @@ -10,39 +10,49 @@ import { DropdownMenuTrigger, } from "@/components/ui/dropdown-menu" +import { Menu } from "lucide-react" +import { SidebarTrigger } from "@/components/ui/sidebar" + import { ModeToggle } from "@/components/theme-toggle" -export function Navbar() { +export default function Navbar() { return ( -