From eea76a129c7e8001eca00037e5915c79ed685169 Mon Sep 17 00:00:00 2001
From: ilyayudovin <ilyayudovin123.@mail.com>
Date: Sun, 7 Jun 2020 19:10:15 +0300
Subject: feat: add Feed and fucntionality for creating polls

---
 src/Feed/Feed.tsx | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)
 create mode 100644 src/Feed/Feed.tsx

(limited to 'src/Feed/Feed.tsx')

diff --git a/src/Feed/Feed.tsx b/src/Feed/Feed.tsx
new file mode 100644
index 0000000..03ba6c0
--- /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(() => ({
+  feed: {
+    maxWidth: 600,
+    margin: '0 auto'
+  }
+}));
+
+const Feed: React.FC<PropTypes> = ({ polls }) => {
+  const classes = usedStyles();
+
+  return (
+    <div className={classes.feed}>
+      {
+        polls.map(poll => <PollCard author={poll.author} contents={poll.contents} />)
+      }
+    </div>
+  );
+};
+
+export default Feed;
-- 
cgit v1.2.3

