
Flowstate
-
+
Workspace Edition
diff --git a/app/components/layout/Header.tsx b/app/components/layout/Header.tsx
index 1181592..2640d2a 100644
--- a/app/components/layout/Header.tsx
+++ b/app/components/layout/Header.tsx
@@ -1,6 +1,17 @@
-import BrandLogo from "./BrandLogo";
-import Image from "next/image";
+/**
+ * @file Header.tsx
+ * @description Application header component containing the mobile brand logo and the user badge navigation.
+ */
+import BrandLogo from "./BrandLogo";
+import UserBadge from "./UserBadge";
+
+/**
+ * Renders the sticky top navigation header, displaying the brand logo on mobile views
+ * and the user profile badge on the right side.
+ *
+ * @returns {JSX.Element} The rendered header component.
+ */
export default function Header() {
return (
@@ -8,21 +19,9 @@ export default function Header() {
- {/* User Profil */}
-
-
-
-
-
-
Charlotte W.
-
Online
-
-
+
+ {/* User Badge */}
+
);
}
diff --git a/app/components/layout/Navbar.tsx b/app/components/layout/Navbar.tsx
index cdef0d3..591bc3b 100644
--- a/app/components/layout/Navbar.tsx
+++ b/app/components/layout/Navbar.tsx
@@ -1,14 +1,78 @@
+/**
+ * @file Navbar.tsx
+ * @description Client component providing responsive navigation for desktop and mobile views with active route indicators.
+ */
+
+"use client";
+
+import Link from "next/link";
+import { usePathname } from "next/navigation";
+import { LayoutDashboard, FileText } from "lucide-react";
+
+/**
+ * Array of navigation items containing their name, route path, and corresponding icon.
+ */
+const navItems = [
+ { name: "Summary", href: "/summary", icon: FileText },
+ { name: "Dashboard", href: "/dashboard", icon: LayoutDashboard },
+];
+
+/**
+ * Renders the responsive navigation bar featuring desktop sidebar layout
+ * and mobile bottom bar layout with active state styling.
+ *
+ * @returns {JSX.Element} The rendered navigation component.
+ */
export default function Navbar() {
+ const pathname = usePathname();
+
+ // Shared function to render navigation links to avoid code duplication
+ const renderNavLinks = (isMobile = false) =>
+ navItems.map((item) => {
+ const Icon = item.icon;
+ const isActive =
+ pathname === item.href ||
+ (item.href !== "/" && pathname.startsWith(item.href));
+
+ return (
+
+
+
+ {item.name}
+
+
+ );
+ });
+
return (
<>
{/* Desktop Navigation */}
{/* Mobile Navigation */}
-