20 lines
521 B
TypeScript
20 lines
521 B
TypeScript
"use client";
|
|
|
|
import { usePathname } from "next/navigation";
|
|
import { BuilderNav } from "./BuilderNav";
|
|
|
|
/**
|
|
* Wraps BuilderNav with pathname-aware visibility.
|
|
* The catalog bar is irrelevant on guide pages — hide it there.
|
|
*/
|
|
export function BuilderNavConditional() {
|
|
const pathname = usePathname();
|
|
|
|
// Hide catalog bar on guide pages — part categories don't apply when reading an article
|
|
if (pathname.startsWith("/guides")) return null;
|
|
|
|
return <BuilderNav />;
|
|
}
|
|
|
|
export default BuilderNavConditional;
|