import { useEffect } from "preact/hooks"; export default function OnboardingHashGate() { useEffect(() => { const landlordSection = document.getElementById("landlord"); const tenantSection = document.getElementById("tenant"); if (!landlordSection || !tenantSection) return; const applyHashState = () => { const tenantOnly = globalThis.location.hash === "#tenant"; landlordSection.classList.toggle("hidden", tenantOnly); tenantSection.classList.toggle("onboarding-tenant-full", tenantOnly); }; applyHashState(); globalThis.addEventListener("hashchange", applyHashState); return () => { globalThis.removeEventListener("hashchange", applyHashState); }; }, []); return null; }