+ {/* Desktop sidebar */}
+
+
+ {/* Mobile top bar */}
+
+
+
+
+
+
+
+ {/* Mobile sidebar overlay */}
+ {mobileOpen && (
+
+ {/* Backdrop */}
+
setMobileOpen(false)}
+ onKeyDown={() => {}}
+ role="presentation"
+ />
+ {/* Sidebar panel */}
+
-
- {/* Mobile Navigation */}
-
-
+
-
+ )}
- {/* Main Content */}
-
{children}
+ {/* Main content */}
+
+ {children}
+
);
}
diff --git a/dashboard/app/components/profile.tsx b/dashboard/app/components/profile.tsx
index 1443ad3..f3feb03 100644
--- a/dashboard/app/components/profile.tsx
+++ b/dashboard/app/components/profile.tsx
@@ -1,11 +1,16 @@
"use client";
import { useAuth0 } from "@auth0/auth0-react";
-import { ChevronDown, LogOut, User } from "lucide-react";
+import { ChevronDown, ChevronRight, LogOut, User } from "lucide-react";
import Image from "next/image";
import { useEffect, useRef, useState } from "react";
-export default function Profile() {
+interface ProfileProps {
+ sidebar?: boolean;
+ expanded?: boolean;
+}
+
+export default function Profile({ sidebar, expanded }: ProfileProps) {
const { user, isAuthenticated, isLoading, logout } = useAuth0();
const [isOpen, setIsOpen] = useState(false);
const dropdownRef = useRef(null);
@@ -33,9 +38,14 @@ export default function Profile() {
if (isLoading) {
return (
-
-
-
+
);
}
@@ -48,6 +58,86 @@ export default function Profile() {
logout({ logoutParams: { returnTo: window.location.origin } });
};
+ if (sidebar) {
+ return (
+
+
+
+ {isOpen && (
+
+
+
+ {user.picture ? (
+
+ ) : (
+
+
+
+ )}
+
+
+ {user.name}
+
+
{user.email}
+
+
+
+
+
+
+
+
+ )}
+
+ );
+ }
+
return (