Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
onClick={() => {
// Prefetch the project query
prefetchQuery(["project", { id: project.name }], fetchProject);
setActiveProject(project.name);
}}
>
setShowProjects(old => {
if (!old) {
prefetchQuery("projects", fetchProjects);
}
return !old;
});
}}