From eecc46cbdc02c31aa6bfbc8eb6d0f3231687fe71 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Thu, 21 Apr 2022 17:52:48 -0500 Subject: [PATCH] Fix useEffect() calls... whoops --- .eslintrc.js | 1 - app/soapbox/features/auth_login/components/logout.tsx | 2 +- .../external_login/components/external-login-form.tsx | 2 +- app/soapbox/features/public_layout/components/pulse.tsx | 2 +- app/soapbox/features/ui/components/promo_panel.tsx | 4 ++-- 5 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index ae8c9e981..bb111e2f4 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -256,7 +256,6 @@ module.exports = { 'promise/catch-or-return': 'error', 'react-hooks/rules-of-hooks': 'error', - 'react-hooks/exhaustive-deps': 'warn', }, overrides: [ { diff --git a/app/soapbox/features/auth_login/components/logout.tsx b/app/soapbox/features/auth_login/components/logout.tsx index e702e146b..5c1bee915 100644 --- a/app/soapbox/features/auth_login/components/logout.tsx +++ b/app/soapbox/features/auth_login/components/logout.tsx @@ -16,7 +16,7 @@ const Logout: React.FC = () => { dispatch(logOut(intl) as any) .then(() => setDone(true)) .catch(console.warn); - }); + }, []); if (done) { return ; diff --git a/app/soapbox/features/external_login/components/external-login-form.tsx b/app/soapbox/features/external_login/components/external-login-form.tsx index 582709007..4b58d176c 100644 --- a/app/soapbox/features/external_login/components/external-login-form.tsx +++ b/app/soapbox/features/external_login/components/external-login-form.tsx @@ -36,7 +36,7 @@ const ExternalLoginForm: React.FC = () => { if (code) { dispatch(loginWithCode(code)); } - }); + }, [code]); if (code) { return ; diff --git a/app/soapbox/features/public_layout/components/pulse.tsx b/app/soapbox/features/public_layout/components/pulse.tsx index 6aba78c32..33e94dae2 100644 --- a/app/soapbox/features/public_layout/components/pulse.tsx +++ b/app/soapbox/features/public_layout/components/pulse.tsx @@ -20,7 +20,7 @@ const Pulse: React.FC = () => { setAnimationData(json); }) .catch(console.error); - }); + }, []); if (animationData) { return ( diff --git a/app/soapbox/features/ui/components/promo_panel.tsx b/app/soapbox/features/ui/components/promo_panel.tsx index 5a0b9a24d..6766a6ad4 100644 --- a/app/soapbox/features/ui/components/promo_panel.tsx +++ b/app/soapbox/features/ui/components/promo_panel.tsx @@ -18,8 +18,8 @@ const PromoPanel: React.FC = () => { {promoItems.map((item, i) => ( - - + + {item.textLocales.get(locale) || item.text}