hotfix: Implement client-side dashboard redirect with loading spinner, improve authentication error handling by clearing user state on 401, and extend SSO redirect loop protection.

This commit is contained in:
ValdiANS
2025-12-10 16:23:51 +07:00
parent 757e0435ac
commit aed58ef10c
3 changed files with 20 additions and 7 deletions
+10 -3
View File
@@ -1,11 +1,18 @@
import { redirect } from 'next/navigation';
'use client';
import { useEffect } from 'react';
import { useRouter } from 'next/navigation';
export default function Home() {
redirect('/dashboard');
const router = useRouter();
useEffect(() => {
router.replace('/dashboard');
}, [router]);
return (
<main className='w-full h-full min-h-screen flex flex-row justify-center items-center'>
<h1>LTI ERP</h1>
<span className='loading loading-spinner loading-lg'></span>
</main>
);
}