diff options
Diffstat (limited to 'src/pages/FeedPage/FeedPage.tsx')
-rw-r--r-- | src/pages/FeedPage/FeedPage.tsx | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/src/pages/FeedPage/FeedPage.tsx b/src/pages/FeedPage/FeedPage.tsx deleted file mode 100644 index da0fb2a..0000000 --- a/src/pages/FeedPage/FeedPage.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import React from 'react'; -import { Poll } from 'which-types'; -import { Container } from '@material-ui/core/'; - -import Feed from '../../components/Feed/Feed'; -import PollSubmission from './PollSubmission'; -import { useAuth } from '../../hooks/useAuth'; -import { useFeed } from '../../hooks/APIClient'; - -const FeedPage: React.FC = () => { - const { data, mutate } = useFeed(); - const { isAuthenticated } = useAuth(); - - const addPoll = (poll: Poll): void => { - mutate([poll, ...data], true); - }; - - return ( - <Container maxWidth="sm" disableGutters> - {isAuthenticated && <PollSubmission addPoll={addPoll} />} - <Feed polls={data} /> - </Container> - ); -}; - -export default FeedPage; - |