diff --git a/app/components/layout/ConditionalNavbar.tsx b/app/components/layout/ConditionalNavbar.tsx new file mode 100644 index 0000000..e23fa77 --- /dev/null +++ b/app/components/layout/ConditionalNavbar.tsx @@ -0,0 +1,16 @@ +"use client"; + +import { usePathname } from "next/navigation"; +import { getStoredUser } from "@/src/lib/auth"; +import Navbar from "./Navbar"; + +export default function ConditionalNavbar() { + const pathname = usePathname(); + const user = getStoredUser(); + + // لو المستخدم مسجل دخول، أو الصفحة الحالية جوه الداشبورد، منظهرش الناف بار العام + const isDashboardRoute = pathname?.startsWith("/dashboard"); + if (user || isDashboardRoute) return null; + + return ; +} \ No newline at end of file diff --git a/app/components/layout/Footer.tsx b/app/components/layout/Footer.tsx new file mode 100644 index 0000000..8f43a95 --- /dev/null +++ b/app/components/layout/Footer.tsx @@ -0,0 +1,13 @@ +import Logo from "@/src/utils/logo"; + +export function Footer() { + return ( + ) +} \ No newline at end of file diff --git a/app/components/layout/Sidebar.tsx b/app/components/layout/Sidebar.tsx index 585ad3d..fb4d485 100644 --- a/app/components/layout/Sidebar.tsx +++ b/app/components/layout/Sidebar.tsx @@ -176,6 +176,7 @@ export function Sidebar() { flexShrink: 0, minHeight: "100vh", padding: "20px 12px", + }} > - {/* عنوان الصفحة */}

لوحة التحكم @@ -38,15 +37,21 @@ export function Topbar() {

- {/* أكشنز */}
- - {/* زرار المنيو — sm فقط، globals.css بتتحكم في الـ display */}
setOpen(true)} />
- {/* الدور */} + {/* زرار "حسابي" — بيروح لصفحة البروفايل، مع hover بيغير اللون ويعمل scale بسيط */} +