mirror of
https://github.com/LucasVbr/meeting-app.git
synced 2026-05-13 17:21:53 +00:00
Add LoadingPage in Graphique during auth
Took 2 minutes
This commit is contained in:
@@ -11,9 +11,12 @@ import { useRef, useEffect } from "react";
|
||||
import { useSession } from "next-auth/react";
|
||||
import type { Session } from "@/models/auth/Session";
|
||||
import { Role } from "@prisma/client";
|
||||
import LoadingPage from '@/components/LoadingPage';
|
||||
|
||||
export default function Graphique() {
|
||||
const { data: session, status } = useSession({ required: true });
|
||||
if (status === 'loading') return <LoadingPage/>
|
||||
|
||||
const { user } = session as unknown as Session;
|
||||
return (
|
||||
<>
|
||||
|
||||
Reference in New Issue
Block a user