From 3c3223c3b41411639ff19ebd58df569cf17999ca Mon Sep 17 00:00:00 2001
From: ilyayudovin <ilyayudovin123@gmail.com>
Date: Sun, 14 Jun 2020 15:56:29 +0300
Subject: divide src into Pages and Components directories

---
 src/Feed/Feed.tsx | 41 -----------------------------------------
 1 file changed, 41 deletions(-)
 delete mode 100644 src/Feed/Feed.tsx

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

diff --git a/src/Feed/Feed.tsx b/src/Feed/Feed.tsx
deleted file mode 100644
index d7bfce1..0000000
--- a/src/Feed/Feed.tsx
+++ /dev/null
@@ -1,41 +0,0 @@
-import React, { useState, useEffect } from 'react';
-import { makeStyles } from '@material-ui/core/styles';
-import { Poll } from '../types';
-import PollCard from '../PollCard/PollCard';
-import { get } from '../requests';
-
-interface PropTypes {
-  page: string;
-}
-
-const useStyles = makeStyles(theme => ({
-  root: {
-    position: 'relative',
-    maxWidth: theme.spacing(75),
-    margin: '0 auto'
-  }
-}));
-
-const Feed: React.FC<PropTypes> = ({ page }) => {
-  const [polls, setPolls] = useState<Poll[]>([]);
-  const classes = useStyles();
-
-  let endpoint = '/polls';
-  // TODO: Make this work
-  if (page === 'feed') endpoint = '/polls';
-
-  useEffect(() => {
-    get(endpoint).then(response => {
-      setPolls(response.data);
-    });
-  }, [endpoint]);
-
-  return (
-    <div className={classes.root}>
-      {polls.map(poll => <PollCard poll={poll} key={poll._id} />)}
-    </div>
-  );
-};
-
-export default Feed;
-
-- 
cgit v1.2.3

