From 0e84386fe75578bbbf2ac7854467070fe8608cde Mon Sep 17 00:00:00 2001
From: ilyayudovin <ilyayudovin123@gmail.com>
Date: Mon, 8 Jun 2020 14:39:13 +0300
Subject: feat: add profile design and functionality to hide and show profile

---
 src/index.tsx | 6 ++++++
 1 file changed, 6 insertions(+)

(limited to 'src/index.tsx')

diff --git a/src/index.tsx b/src/index.tsx
index 164c78b..bc6158a 100644
--- a/src/index.tsx
+++ b/src/index.tsx
@@ -11,6 +11,7 @@ import 'typeface-roboto';
 
 import Header from './Header/Header';
 import Feed from './Feed/Feed';
+import ProfileInfo from './ProfileInfo/ProfileInfo';
 
 const theme = createMuiTheme({
   palette: {
@@ -58,7 +59,9 @@ const polls = [{
 
 const useStyles = makeStyles(theme => ({
   root: {
+    width: 600,
     marginTop: theme.spacing(15),
+    margin: '0 auto',
   },
 }));
 
@@ -73,6 +76,9 @@ const App: React.FC = () => {
       <CssBaseline />
       <Header setPage={setPage} />
       <div className={classes.root}>
+        {
+          page === 'profile' ? <ProfileInfo profile={polls[0]}/> : null
+        }
         <Feed polls={polls} />
         <h1> We are on page {page}! </h1>
       </div>
-- 
cgit v1.2.3


From 77fe6ac371160ffc385b1378093f34d0b1f2a8c9 Mon Sep 17 00:00:00 2001
From: ilyayudovin <ilyayudovin123@gmail.com>
Date: Mon, 8 Jun 2020 14:55:52 +0300
Subject: fix: fix eslint errors

---
 src/index.tsx | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

(limited to 'src/index.tsx')

diff --git a/src/index.tsx b/src/index.tsx
index bc6158a..a7df3c1 100644
--- a/src/index.tsx
+++ b/src/index.tsx
@@ -57,15 +57,13 @@ const polls = [{
   }
 }];
 
-const useStyles = makeStyles(theme => ({
+const useStyles = makeStyles({
   root: {
     width: 600,
     marginTop: theme.spacing(15),
-    margin: '0 auto',
-  },
-}));
-
-
+    margin: '0 auto'
+  }
+});
 
 const App: React.FC = () => {
   const [page, setPage] = useState('feed');
@@ -77,7 +75,7 @@ const App: React.FC = () => {
       <Header setPage={setPage} />
       <div className={classes.root}>
         {
-          page === 'profile' ? <ProfileInfo profile={polls[0]}/> : null
+          page === 'profile' ? <ProfileInfo profile={polls[0]} /> : null
         }
         <Feed polls={polls} />
         <h1> We are on page {page}! </h1>
-- 
cgit v1.2.3


From 755b44e76307e04387ddacfdee7124ee00197de4 Mon Sep 17 00:00:00 2001
From: ilyayudovin <ilyayudovin123@gmail.com>
Date: Mon, 8 Jun 2020 15:10:36 +0300
Subject: fix: fix all review comments

---
 src/index.tsx | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

(limited to 'src/index.tsx')

diff --git a/src/index.tsx b/src/index.tsx
index a7df3c1..0d9751c 100644
--- a/src/index.tsx
+++ b/src/index.tsx
@@ -59,7 +59,7 @@ const polls = [{
 
 const useStyles = makeStyles({
   root: {
-    width: 600,
+    width: theme.spacing(75),
     marginTop: theme.spacing(15),
     margin: '0 auto'
   }
@@ -75,10 +75,9 @@ const App: React.FC = () => {
       <Header setPage={setPage} />
       <div className={classes.root}>
         {
-          page === 'profile' ? <ProfileInfo profile={polls[0]} /> : null
+          page === 'profile' && <ProfileInfo profile={polls[0]} />
         }
         <Feed polls={polls} />
-        <h1> We are on page {page}! </h1>
       </div>
     </ThemeProvider>
   );
-- 
cgit v1.2.3

