blob: 33e6d038efad431aefa915b35b7b731935a526ca (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
import React from 'react';
import { makeStyles } from '@material-ui/core/styles';
import { Poll } from '../types';
import PollCard from '../PollCard/PollCard';
interface PropTypes {
polls: Poll[],
}
const usedStyles = makeStyles(theme => ({
feed: {
position: 'relative',
maxWidth: theme.spacing(75),
margin: '0 auto'
}
}));
const Feed: React.FC<PropTypes> = ({ polls }) => {
const classes = usedStyles();
return (
<div className={classes.feed}>
{
polls.map(poll => <PollCard poll={poll} />)
}
</div>
);
};
export default Feed;
|