Skip to content

Commit 6764e7a

Browse files
committed
run effect only once
passing an empty dep array hence, as per https://reactjs.org/docs/hooks-effect.html#tip-optimizing-performance-by-skipping-effects Signed-off-by: Tarun Pothulapati <[email protected]>
1 parent 2a7adf2 commit 6764e7a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

components/dashboard/src/admin/Settings.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export default function Settings() {
2929
const setting = await getGitpodService().server.adminGetSettings();
3030
setAdminSettings(setting)
3131
})();
32-
});
32+
}, []);
3333

3434
if (!user || !user?.rolesOrPermissions?.includes('admin')) {
3535
return <Redirect to="/"/>

0 commit comments

Comments
 (0)