Skip to content

Commit

Permalink
🐛 Fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
naelob committed Apr 22, 2024
1 parent ba8e31d commit 67c41ac
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion apps/client-ts/src/components/RootLayout/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,11 @@ export const RootLayout = () => {
if (data) {
const response = await fetch(`${config.API_URL}/projects/${data.id_user}`);
const projectsData = await response.json();
console.log("PROJECTS FETCHED ARE => "+ JSON.stringify(projectsData))
setIdProject(projectsData[0]?.id_project); // Assuming you want to set the first project ID
setProjects(projectsData as Project[])
}
};
};
fetchProjects();
}
}, [data, setIdProject, setProfile, setProjects]);
Expand Down
2 changes: 1 addition & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 67c41ac

Please sign in to comment.