14 lines
328 B
TypeScript
14 lines
328 B
TypeScript
import { redirect } from 'next/navigation';
|
|
import { createClient } from '@/lib/supabase/server';
|
|
|
|
export default async function Home() {
|
|
const supabase = await createClient();
|
|
const { data: { user } } = await supabase.auth.getUser();
|
|
|
|
if (user) {
|
|
redirect('/dashboard/kpis');
|
|
} else {
|
|
redirect('/login');
|
|
}
|
|
}
|