Skip to content

Commit 91a9772

Browse files
MichaelDeBoeySaraVieira
authored andcommitted
Fix ESLint hooks warnings (codesandbox#1903)
1 parent e0fe5b6 commit 91a9772

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

packages/dynamic-pages/pages/user-sandboxes/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,13 @@ const Sandboxes = ({ data, fetchUrl, profile, currentTab }) => {
3636
useEffect(() => {
3737
setSandboxes(data[1]);
3838
setPage(1);
39-
}, [currentTab]);
39+
}, [currentTab, data]);
4040

4141
return (
4242
<PageContainer>
4343
<Grid>
4444
<Sidebar {...profile} />
45+
4546
<main>
4647
<TabNavigation>
4748
<Link

packages/dynamic-pages/utils/useWindowSize.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@ const useWindowSize = (initialWidth = Infinity, initialHeight = Infinity) => {
1616
});
1717
};
1818
window.addEventListener('resize', handler);
19+
1920
return () => window.removeEventListener('resize', handler);
20-
}, [1]);
21+
}, []);
2122

2223
return state;
2324
};

0 commit comments

Comments
 (0)