mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-20 13:32:00 +00:00
33 lines
822 B
TypeScript
33 lines
822 B
TypeScript
'use client';
|
|
|
|
import { useEffect } from 'react';
|
|
import { usePathname, useRouter } from 'next/navigation';
|
|
import { useAuth } from '@/services/hooks/useAuth';
|
|
|
|
export default function Home() {
|
|
const { isLoadingUser } = useAuth();
|
|
|
|
const router = useRouter();
|
|
const pathname = usePathname();
|
|
|
|
useEffect(() => {
|
|
if (pathname === '/') {
|
|
router.replace('/dashboard');
|
|
}
|
|
}, [pathname]);
|
|
|
|
if (isLoadingUser) {
|
|
return (
|
|
<main className='w-full h-full min-h-screen flex flex-row justify-center items-center'>
|
|
<span className='loading loading-spinner loading-lg'></span>
|
|
</main>
|
|
);
|
|
}
|
|
|
|
return (
|
|
<main className='w-full h-full min-h-screen flex flex-row justify-center items-center'>
|
|
<span className='loading loading-spinner loading-lg'></span>
|
|
</main>
|
|
);
|
|
}
|