Fix useEffect() calls... whoops
This commit is contained in:
parent
79a5820687
commit
eecc46cbdc
|
@ -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: [
|
||||||
{
|
{
|
||||||
|
|
|
@ -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='/' />;
|
||||||
|
|
|
@ -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 />;
|
||||||
|
|
|
@ -20,7 +20,7 @@ const Pulse: React.FC = () => {
|
||||||
setAnimationData(json);
|
setAnimationData(json);
|
||||||
})
|
})
|
||||||
.catch(console.error);
|
.catch(console.error);
|
||||||
});
|
}, []);
|
||||||
|
|
||||||
if (animationData) {
|
if (animationData) {
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -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>
|
||||||
|
|
Loading…
Reference in New Issue