blob: 10b1adce143eea80c68cb07b2e0672b32f0e1164 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
import React from 'react';
import { Container } from '@material-ui/core/';
import PollsList from '../../components/PollsList/PollsList';
import Fab from '../../components/Fab/Fab';
import { useAuth } from '../../hooks/useAuth';
import { useFeed } from '../../hooks/APIClient';
const Feed: React.FC = () => {
const { data: polls, mutate } = useFeed();
const { isAuthenticated } = useAuth();
return (
<Container maxWidth="sm" disableGutters>
{isAuthenticated && <Fab hideOnScroll />}
<PollsList polls={polls} mutate={mutate} />
</Container>
);
};
export default Feed;
|