aboutsummaryrefslogtreecommitdiff
path: root/src/containers/Feed/Feed.tsx
diff options
context:
space:
mode:
authoreug-vs <eug-vs@keemail.me>2020-08-12 01:59:27 +0300
committereug-vs <eug-vs@keemail.me>2020-08-13 17:16:17 +0300
commit5744923265ff51e392575edfd6a8182589105dc6 (patch)
tree9294f30455405ddaecfdd4ecf7eedf6c5c80c872 /src/containers/Feed/Feed.tsx
parent86a946b2b0535829857757eeaa2226e6f0814f3b (diff)
downloadwhich-ui-5744923265ff51e392575edfd6a8182589105dc6.tar.gz
feat: PollCreation page and Fab component
Diffstat (limited to 'src/containers/Feed/Feed.tsx')
-rw-r--r--src/containers/Feed/Feed.tsx11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/containers/Feed/Feed.tsx b/src/containers/Feed/Feed.tsx
index e923bdd..ad306da 100644
--- a/src/containers/Feed/Feed.tsx
+++ b/src/containers/Feed/Feed.tsx
@@ -1,23 +1,22 @@
import React from 'react';
+import { useHistory } from 'react-router-dom'
import { Poll } from 'which-types';
import { Container } from '@material-ui/core/';
import PollsList from '../../components/PollsList/PollsList';
-import PollSubmission from './PollSubmission';
+import Fab from '../../components/Fab/Fab';
import { useAuth } from '../../hooks/useAuth';
import { useFeed } from '../../hooks/APIClient';
+
const Feed: React.FC = () => {
+ const classes = useStyles();
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} />}
+ {isAuthenticated && <Fab hideOnScroll />}
<PollsList polls={polls} mutate={mutate} />
</Container>
);