aboutsummaryrefslogtreecommitdiff
path: root/src/Feed
diff options
context:
space:
mode:
authorilyayudovin <46264063+ilyayudovin@users.noreply.github.com>2020-06-07 20:21:59 +0300
committerGitHub <noreply@github.com>2020-06-07 20:21:59 +0300
commitfa3f95443c47541e9a7061ea1d3fd079c40b1fa8 (patch)
treeff56c75b023fa166781275adfd65ea917d275968 /src/Feed
parentb8b848dfd6e3843c6b455c8344320dcd187b72da (diff)
parent98442762c1bbdf4e4aff317ca8ec660b6817418f (diff)
downloadwhich-ui-fa3f95443c47541e9a7061ea1d3fd079c40b1fa8.tar.gz
Merge pull request #12 from ilyayudovin/feed
Add Feed and fucntionality for creating polls
Diffstat (limited to 'src/Feed')
-rw-r--r--src/Feed/Feed.tsx29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/Feed/Feed.tsx b/src/Feed/Feed.tsx
new file mode 100644
index 0000000..e5bc9aa
--- /dev/null
+++ b/src/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 usedStyles = makeStyles(theme => ({
+ feed: {
+ 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;