diff options
Diffstat (limited to 'src/containers/FeedPage/FeedPage.tsx')
-rw-r--r-- | src/containers/FeedPage/FeedPage.tsx | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/src/containers/FeedPage/FeedPage.tsx b/src/containers/FeedPage/FeedPage.tsx deleted file mode 100644 index 7445c25..0000000 --- a/src/containers/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 PollsList from '../../components/PollsList/PollsList'; -import PollSubmission from './PollSubmission'; -import { useAuth } from '../../hooks/useAuth'; -import { useFeed } from '../../hooks/APIClient'; - -const FeedPage: React.FC = () => { - const { data: polls, mutate } = useFeed(); - const { isAuthenticated } = useAuth(); - - const addPoll = (poll: Poll): void => { - mutate([poll, ...polls], true); - }; - - return ( - <Container maxWidth="sm" disableGutters> - {isAuthenticated && <PollSubmission addPoll={addPoll} />} - <PollsList polls={polls} mutate={mutate} /> - </Container> - ); -}; - -export default FeedPage; - |