Remove conditional header component

This commit is contained in:
adilallo committed 2026-02-06 08:29:58 -07:00
1 parent 0aaa694fab
commit d5c7262794
7 files changed
+23 -74

No files matched your search

@@ -0,0 +1,21 @@
"use client";
import { memo } from "react";
import { usePathname } from "next/navigation";
import TopNav from "./TopNav.container";
import type { TopNavProps } from "./TopNav.types";
/**
* TopNav wrapper that automatically determines folderTop based on current pathname.
* Use this in layout.tsx instead of ConditionalHeader.
*/
const TopNavWithPathname = memo<Omit<TopNavProps, "folderTop">>((props) => {
const pathname = usePathname();
const isHomePage = pathname === "/";
return <TopNav {...props} folderTop={isHomePage} />;
});
TopNavWithPathname.displayName = "TopNavWithPathname";
export default TopNavWithPathname;