Skip to content

Commit

Permalink
1559 fix maploading modal (#1590)
Browse files Browse the repository at this point in the history
* Make map loading modal facts shuffle again

#1559

* Remove isLoading req from FactModal, reuse currentFactIndex

* updated dependency array

---------

Co-authored-by: alee <[email protected]>
  • Loading branch information
edwinjue and qnlee authored Jan 3, 2024
1 parent ee9fc4c commit 2250b72
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions components/FactModal/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ export default function FactModal() {
setCurrentFactIndex((currentFactIndex + 1) % factsLength);
}, seconds(5));
return () => clearInterval(intervalId);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
}, [currentFactIndex, factsLength]);

const handleClose = () => {
setOpen(false);
Expand Down

0 comments on commit 2250b72

Please sign in to comment.