diff --git a/src/app/FamilyProvider.tsx b/src/app/FamilyProvider.tsx index d560ffc..14b4634 100644 --- a/src/app/FamilyProvider.tsx +++ b/src/app/FamilyProvider.tsx @@ -49,6 +49,10 @@ export function FamilyProvider({ children: providerChildren }: { children: React const [memberCount, setMemberCount] = useState(2); useEffect(() => { + if (typeof window === "undefined") { + setLoading(false); + return; + } const path = window.location.pathname; console.log("FamilyProvider: checking path =", path); if (path.startsWith("/admin") || path === "/admin-login") {