chore: fmt

This commit is contained in:
2026-04-01 14:42:24 +02:00
parent 7b3d5461ef
commit 71b85d6874
3 changed files with 22 additions and 17 deletions

View File

@@ -10,12 +10,12 @@ export function SiteHeader() {
const routerState = useRouterState();
const pathname = routerState.location.pathname;
const isHomepage = pathname === "/";
if (pathname === "/kamp") return null;
const isKamp = pathname === "/kamp";
const [isVisible, setIsVisible] = useState(false);
useEffect(() => {
if (isKamp) return;
if (!isHomepage) {
setIsVisible(true);
return;
@@ -28,7 +28,9 @@ export function SiteHeader() {
handleScroll();
window.addEventListener("scroll", handleScroll, { passive: true });
return () => window.removeEventListener("scroll", handleScroll);
}, [isHomepage]);
}, [isHomepage, isKamp]);
if (isKamp) return null;
if (!session?.user) {
return <Header isGuest isVisible={isVisible} isHomepage={isHomepage} />;