Auto refresh: fix usage of useEffect.

master
Tom Hacohen 4 years ago
parent 0a84405619
commit 99f39f4453

@ -161,7 +161,7 @@ export default function App() {
const interval = 60 * 1000; const interval = 60 * 1000;
const id = setInterval(autoRefresh, interval); const id = setInterval(autoRefresh, interval);
return () => clearInterval(id); return () => clearInterval(id);
}); }, []);
function toggleDrawer() { function toggleDrawer() {
setDrawerOpen(!drawerOpen); setDrawerOpen(!drawerOpen);

Loading…
Cancel
Save