Merge pull request #3803 from imsyedabdullah/3802-team-to-user-switch

Issue#3802 - Team to user switch fixed
This commit is contained in:
Mike Cao
2025-12-01 23:15:00 -08:00
committed by GitHub
2 changed files with 3 additions and 4 deletions

View File

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