From 8dec46e01d3de7e5e1767670f1f2d7d0b9d35696 Mon Sep 17 00:00:00 2001 From: isra el Date: Sun, 9 Mar 2025 13:08:26 +0300 Subject: [PATCH] chore(web): fix react hook dependencies --- web/components/shared/contribute-modal.tsx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/web/components/shared/contribute-modal.tsx b/web/components/shared/contribute-modal.tsx index c9c8488..c75732e 100644 --- a/web/components/shared/contribute-modal.tsx +++ b/web/components/shared/contribute-modal.tsx @@ -98,7 +98,6 @@ export function ContributeModal() { localStorage.getItem(STORAGE_KEYS.HAS_CONTRIBUTED) === 'true' if (hasContributed) return - const lastShown = localStorage.getItem(STORAGE_KEYS.LAST_SHOWN) const now = Date.now() @@ -117,7 +116,14 @@ export function ContributeModal() { checkAndShowModal() } }) - }, [currentSubscription?.plan?.name, currentSubscription.user.createdAt, currentUser?.createdAt, currentUserError, isLoadingSubscription, isLoadingUser, subscriptionError]) + }, [ + currentSubscription, + currentUser, + currentUserError, + isLoadingSubscription, + isLoadingUser, + subscriptionError, + ]) const handleContributed = () => { localStorage.setItem(STORAGE_KEYS.HAS_CONTRIBUTED, 'true')