Issue#3802 - Team to user switch fixed

This commit is contained in:
Syed Abdullah 2025-11-28 06:10:19 +00:00
parent a19b92a5cb
commit a645dc7ba5
2 changed files with 4 additions and 6 deletions

View file

@ -1,7 +1,7 @@
'use client';
import { useEffect } from 'react';
import { redirect } from 'next/navigation';
import { getItem, removeItem } from '@/lib/storage';
import { getItem } from '@/lib/storage';
import { LAST_TEAM_CONFIG } from '@/lib/constants';
export default function RootPage() {
@ -10,11 +10,9 @@ export default function RootPage() {
if (lastTeam) {
redirect(`/teams/${lastTeam}/websites`);
} else {
removeItem(LAST_TEAM_CONFIG);
redirect(`/websites`);
}
redirect(`/websites`);
}, []);
return null;