update laye out and update home page also create footer page

This commit is contained in:
m7amedez5511
2026-07-08 17:49:08 +03:00
parent c814c5b97c
commit 5707521b92
15 changed files with 182 additions and 84 deletions

View File

@@ -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 <Navbar />;
}