Skip to content

Commit 9817e3e

Browse files
Merge pull request #484 from PeterYurkovich/new-update
OU-943: remove broken useEffect
2 parents 569dc72 + 58925e5 commit 9817e3e

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

web/src/components/MetricsPage.tsx

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -327,17 +327,6 @@ export const ToggleGraph: React.FC = () => {
327327

328328
const dispatch = useDispatch();
329329
const toggle = React.useCallback(() => dispatch(toggleGraphs()), [dispatch]);
330-
// Use an empty useEffect to get access to the cleanup function so that if graphs are
331-
// currently hidden then we toggle one more time as we unmount
332-
React.useEffect(
333-
() => () => {
334-
if (hideGraphs) {
335-
toggle();
336-
}
337-
},
338-
// eslint-disable-next-line react-hooks/exhaustive-deps
339-
[hideGraphs],
340-
);
341330

342331
// Use an empty useEffect to get access to the cleanup function so that if graphs are
343332
// currently hidden then we show the graphs as we unmount

0 commit comments

Comments
 (0)