aboutsummaryrefslogtreecommitdiff
path: root/src/components/Feed
diff options
context:
space:
mode:
authorEugene Sokolov <eug-vs@keemail.me>2020-06-14 20:44:40 +0300
committerGitHub <noreply@github.com>2020-06-14 20:44:40 +0300
commit65e41d1d8a3844a6d7268340f5d88b5957e2355d (patch)
tree3d455f133b5afa1e6a1c30c4589ef3db39dd4c4e /src/components/Feed
parent99b44bc80fa3228131a05fccb13f75ff8a46b116 (diff)
parentfbe489c83e9ef4c03b87624a4dec66de61af364a (diff)
downloadwhich-ui-65e41d1d8a3844a6d7268340f5d88b5957e2355d.tar.gz
Merge pull request #33 from ilyayudovin/pages
divide src into Pages and Components directories
Diffstat (limited to 'src/components/Feed')
-rw-r--r--src/components/Feed/Feed.tsx29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/components/Feed/Feed.tsx b/src/components/Feed/Feed.tsx
new file mode 100644
index 0000000..8dc3ec1
--- /dev/null
+++ b/src/components/Feed/Feed.tsx
@@ -0,0 +1,29 @@
+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 useStyles = makeStyles(theme => ({
+ root: {
+ position: 'relative',
+ maxWidth: theme.spacing(75),
+ margin: '0 auto'
+ }
+}));
+
+const Feed: React.FC<PropTypes> = ({ polls }) => {
+ const classes = useStyles();
+
+ return (
+ <div className={classes.root}>
+ {polls.map(poll => <PollCard poll={poll} key={poll._id} />)}
+ </div>
+ );
+};
+
+export default Feed;
+