Fix useEffect() calls... whoops

This commit is contained in:
Alex Gleason 2022-04-21 17:52:48 -05:00
parent 79a5820687
commit eecc46cbdc
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7
5 changed files with 5 additions and 6 deletions

View file

@ -256,7 +256,6 @@ module.exports = {
'promise/catch-or-return': 'error',
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'warn',
},
overrides: [
{

View file

@ -16,7 +16,7 @@ const Logout: React.FC = () => {
dispatch(logOut(intl) as any)
.then(() => setDone(true))
.catch(console.warn);
});
}, []);
if (done) {
return <Redirect to='/' />;

View file

@ -36,7 +36,7 @@ const ExternalLoginForm: React.FC = () => {
if (code) {
dispatch(loginWithCode(code));
}
});
}, [code]);
if (code) {
return <Spinner />;

View file

@ -20,7 +20,7 @@ const Pulse: React.FC = () => {
setAnimationData(json);
})
.catch(console.error);
});
}, []);
if (animationData) {
return (

View file

@ -18,8 +18,8 @@ const PromoPanel: React.FC = () => {
<Widget title={siteTitle}>
<Stack space={2}>
{promoItems.map((item, i) => (
<Text>
<a className='flex items-center' href={item.url} target='_blank' key={i}>
<Text key={i}>
<a className='flex items-center' href={item.url} target='_blank'>
<Icon id={item.icon} className='flex-none text-lg mr-2' fixedWidth />
{item.textLocales.get(locale) || item.text}
</a>