Skip to content

Commit c6a4e3f

Browse files
committed
Revert "Removes unnecessary dependency from useEffect hook"
This reverts commit 5733e60.
1 parent 5733e60 commit c6a4e3f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/features/projects/view/ProjectsContextProvider.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ const refreshProjects = useCallback(() => {
3737
}, []);
3838

3939
// Trigger background refresh after initial mount
40+
4041
useEffect(() => {
4142
// Initial refresh
4243
refreshProjects();
@@ -47,7 +48,7 @@ useEffect(() => {
4748
return () => {
4849
document.removeEventListener("visibilitychange", handleVisibilityChange);
4950
};
50-
}, []);
51+
}, [refreshProjects]);
5152

5253
return (
5354
<ProjectsContext.Provider value={{ projects, refreshing, refreshProjects }}>

0 commit comments

Comments
 (0)