mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 04:37:11 +01:00
20 lines
477 B
TypeScript
20 lines
477 B
TypeScript
'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 } from '@/lib/storage';
|
|
|
|
export default function RootPage() {
|
|
useEffect(() => {
|
|
const lastTeam = getItem(LAST_TEAM_CONFIG);
|
|
|
|
if (lastTeam) {
|
|
redirect(`/teams/${lastTeam}/websites`);
|
|
} else {
|
|
redirect(`/websites`);
|
|
}
|
|
}, []);
|
|
|
|
return null;
|
|
}
|