From 6247bb42bcbfae061adb59f2b4531e88a709df95 Mon Sep 17 00:00:00 2001 From: Mannu Date: Sun, 17 May 2026 11:22:43 +0530 Subject: [PATCH] Fix hydration - check typeof window --- src/app/FamilyProvider.tsx | 4 ++++ 1 file changed, 4 insertions(+) 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") {