MCPcopy Create free account
hub / github.com/GreatStackDev/project-management / fetchUserTasks

Function fetchUserTasks

src/components/MyTasksSidebar.jsx:29–37  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

27 };
28
29 const fetchUserTasks = () => {
30 const userId = user?.id || '';
31 if (!userId || !currentWorkspace) return;
32 const currentWorkspaceTasks = currentWorkspace.projects.flatMap((project) => {
33 return project.tasks.filter((task) => task?.assignee?.id === userId);
34 });
35
36 setMyTasks(currentWorkspaceTasks);
37 }
38
39 useEffect(() => {
40 fetchUserTasks()

Callers 1

MyTasksSidebarFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected