diff options
author | eug-vs <eug-vs@keemail.me> | 2020-08-10 00:02:24 +0300 |
---|---|---|
committer | eug-vs <eug-vs@keemail.me> | 2020-08-10 00:02:24 +0300 |
commit | fd6e663a1bcc43cfc49bda99ccbfab380489324b (patch) | |
tree | ea25ea2c81db0f64e10123dbadd73f361b904da2 /src/pages/ProfilePage/ProfilePage.tsx | |
parent | 359ec6a68ea92b3d1eecf020742157eb3be90b9f (diff) | |
download | which-ui-fd6e663a1bcc43cfc49bda99ccbfab380489324b.tar.gz |
feat!: add useLocalStorage hook
Diffstat (limited to 'src/pages/ProfilePage/ProfilePage.tsx')
-rw-r--r-- | src/pages/ProfilePage/ProfilePage.tsx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/pages/ProfilePage/ProfilePage.tsx b/src/pages/ProfilePage/ProfilePage.tsx index 293b766..9e00784 100644 --- a/src/pages/ProfilePage/ProfilePage.tsx +++ b/src/pages/ProfilePage/ProfilePage.tsx @@ -21,7 +21,7 @@ const ProfilePage: React.FC = () => { if (!username) { if (user) history.push(`/profile/${user.username}`); else history.push('/login'); - }; + } }, [username, history, user]); @@ -31,7 +31,9 @@ const ProfilePage: React.FC = () => { const { left, right } = current.contents; return total + left.votes + right.votes; }, 0 - ), [polls]); + ), + [polls] + ); return ( <Container maxWidth="sm" disableGutters> |