Skip to content

Commit

Permalink
🐛 Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
naelob committed Apr 21, 2024
1 parent 071a20a commit 23b0695
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions apps/client-ts/src/components/RootLayout/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import config from '@/lib/config';
import { useStytchUser } from '@stytch/nextjs';
import useProfile from '@/hooks/useProfile';
import useProfileStore from '@/state/profileStore';
import useProjectStore from '@/state/projectStore';
import useProjects from '@/hooks/useProjects';

const useDeviceSize = () => {

Expand Down Expand Up @@ -50,6 +52,15 @@ export const RootLayout = () => {

const { profile, setProfile } = useProfileStore();

const { idProject, setIdProject } = useProjectStore();
const { data : projects, isLoading: isloadingProjects } = useProjects();

useEffect(()=>{
if(projects && projects[0]){
setIdProject(projects[0].id_project);
}
},[projects, setIdProject])

useEffect(()=> {
if(data){
//console.log("data is "+ JSON.stringify(data));
Expand Down

0 comments on commit 23b0695

Please sign in to comment.