From 2250b72f36e3e2bc283a9129dc18120b15ab3857 Mon Sep 17 00:00:00 2001 From: Edwin J Date: Wed, 3 Jan 2024 12:33:00 -0800 Subject: [PATCH] 1559 fix maploading modal (#1590) * Make map loading modal facts shuffle again https://github.com/hackforla/311-data/issues/1559 * Remove isLoading req from FactModal, reuse currentFactIndex * updated dependency array --------- Co-authored-by: alee --- components/FactModal/index.jsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/components/FactModal/index.jsx b/components/FactModal/index.jsx index 45da5aa93..e5da8656d 100644 --- a/components/FactModal/index.jsx +++ b/components/FactModal/index.jsx @@ -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);