From 2a0d4cc604d214b1bc437335673acbab805e9523 Mon Sep 17 00:00:00 2001 From: nael Date: Mon, 22 Apr 2024 02:19:06 +0200 Subject: [PATCH] :pencil2: Typo --- apps/client-ts/src/components/RootLayout/index.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/client-ts/src/components/RootLayout/index.tsx b/apps/client-ts/src/components/RootLayout/index.tsx index c918db82b..ba81ea799 100644 --- a/apps/client-ts/src/components/RootLayout/index.tsx +++ b/apps/client-ts/src/components/RootLayout/index.tsx @@ -43,6 +43,7 @@ export const RootLayout = () => { const { user } = useStytchUser(); const {data, isLoading, isError, error} = useProfile(user?.user_id!); + if(isLoading) { console.log("loading profiles"); } @@ -54,9 +55,9 @@ export const RootLayout = () => { const { idProject, setIdProject } = useProjectStore(); - const { data : projects, isLoading: isloadingProjects } = useProjectsByUser(profile!.id_user); + const { data : projects, isLoading: isloadingProjects } = useProjectsByUser(profile?.id_user!); - useEffect(()=> { + useEffect(() => { if(projects && projects[0]){ setIdProject(projects[0].id_project); }