fix: alot
CI / build-and-test (push) Canceled after 0s

This commit is contained in:
2026-10-19 21:41:07 +02:00
parent df90cf8a18
commit fa38ac7617
70 changed files with 1389 additions and 1023 deletions
+8 -13
View File
@@ -1,20 +1,15 @@
'use client';
import { redirect } from 'next/navigation';
import { useEffect, useState } from 'react';
import { api } from '@/lib/api/client';
import { useEffect } from 'react';
import { useRouter } from 'next/navigation';
import { readSession } from '@/lib/session';
export default function Home() {
const router = useRouter();
useEffect(() => {
const cookie = document.cookie
.split('; ')
.find((row) => row.startsWith('access_token='));
if (cookie) {
redirect('/dashboard');
} else {
redirect('/login');
}
}, []);
router.replace(readSession() ? '/dashboard' : '/login');
}, [router]);
return null;
}
}