From c66fa85075857296c8705250e1992e8caab5c6ba Mon Sep 17 00:00:00 2001 From: AmirReza Jamali Date: Tue, 18 Nov 2025 16:28:27 +0330 Subject: [PATCH] feat: Update NavigationBar to accept host as a prop and wrap in Suspense --- app/(home)/layout.tsx | 9 +++++++-- app/_components/NavigationBar.tsx | 5 +++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/app/(home)/layout.tsx b/app/(home)/layout.tsx index bcf1004..33bfe54 100644 --- a/app/(home)/layout.tsx +++ b/app/(home)/layout.tsx @@ -1,7 +1,9 @@ import type { Metadata } from "next"; import { Geist, Geist_Mono } from "next/font/google"; +import { headers } from "next/headers"; import Image from "next/image"; import Link from "next/link"; +import { Suspense } from "react"; import { ToastContainer, Zoom } from "react-toastify"; import NavigationBar from "../_components/NavigationBar"; import "../globals.css"; @@ -75,6 +77,8 @@ export default async function RootLayout({ }: Readonly<{ children: React.ReactNode; }>) { + const domain = (await headers()).get("host"); + const contactInfo = [ { icon: "/Message.svg", @@ -114,8 +118,9 @@ export default async function RootLayout({ /> - - + + + { +const NavigationBar = ({ host }: { host: string }) => { const pathname = usePathname(); + return (