Fix FamilyProvider redirect for admin pages
Skip family check when pathname starts with /admin to prevent redirect to onboarding Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
d94a15e38e
commit
70376d2e96
1 changed files with 6 additions and 0 deletions
|
|
@ -49,6 +49,12 @@ export function FamilyProvider({ children: providerChildren }: { children: React
|
|||
const [memberCount, setMemberCount] = useState(2);
|
||||
|
||||
useEffect(() => {
|
||||
// Skip family check for admin pages
|
||||
if (typeof window !== "undefined" && window.location.pathname.startsWith("/admin")) {
|
||||
setLoading(false);
|
||||
return;
|
||||
}
|
||||
|
||||
async function fetchFamilyData() {
|
||||
try {
|
||||
// Get current session from database
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue