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', 'promise/catch-or-return': 'error',
'react-hooks/rules-of-hooks': 'error', 'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'warn',
}, },
overrides: [ overrides: [
{ {

View File

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

View File

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

View File

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

View File

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