aboutsummaryrefslogtreecommitdiff
path: root/src/pages/ProfilePage
diff options
context:
space:
mode:
Diffstat (limited to 'src/pages/ProfilePage')
-rw-r--r--src/pages/ProfilePage/ProfilePage.tsx6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/pages/ProfilePage/ProfilePage.tsx b/src/pages/ProfilePage/ProfilePage.tsx
index 82e5cd8..ba4db7d 100644
--- a/src/pages/ProfilePage/ProfilePage.tsx
+++ b/src/pages/ProfilePage/ProfilePage.tsx
@@ -1,5 +1,6 @@
import React, { useState, useEffect } from 'react';
import { User, Poll } from 'which-types';
+import { Container } from '@material-ui/core';
import ProfileInfo from './ProfileInfo';
import Feed from '../../components/Feed/Feed';
@@ -24,6 +25,7 @@ const ProfilePage: React.FC = () => {
setUserInfo(response.data);
});
get(`/profiles/${id}`).then(response => {
+ setPolls([]);
setPolls(response.data);
setTotalVotes(response.data.reduce(
(total: number, current: Poll) => {
@@ -37,7 +39,7 @@ const ProfilePage: React.FC = () => {
}, [navigate, page, user]);
return (
- <>
+ <Container maxWidth="sm" disableGutters>
<ProfileInfo
userInfo={userInfo}
setUserInfo={setUserInfo}
@@ -46,7 +48,7 @@ const ProfilePage: React.FC = () => {
loading={isLoading}
/>
<Feed polls={[...polls]} />
- </>
+ </Container>
);
};