aboutsummaryrefslogtreecommitdiff
path: root/src/pages/Profile/Profile.js
diff options
context:
space:
mode:
authorEug-VS <eug-vs@keemail.me>2020-01-12 15:35:46 +0300
committerEug-VS <eug-vs@keemail.me>2020-01-12 18:11:45 +0300
commit3ef3cb7f0b25a448e81e5b81738758f4545337cc (patch)
tree51919958c4c0b3f2bf2f2e0e0cb7b97a09022ad9 /src/pages/Profile/Profile.js
parentc06bce7fdab23e52d33636e3585c86d48c0bfa91 (diff)
downloadchrono-cube-ui-3ef3cb7f0b25a448e81e5b81738758f4545337cc.tar.gz
Implement Registration component
Diffstat (limited to 'src/pages/Profile/Profile.js')
-rw-r--r--src/pages/Profile/Profile.js26
1 files changed, 12 insertions, 14 deletions
diff --git a/src/pages/Profile/Profile.js b/src/pages/Profile/Profile.js
index 3b0de1e..f2c44ef 100644
--- a/src/pages/Profile/Profile.js
+++ b/src/pages/Profile/Profile.js
@@ -1,13 +1,11 @@
import React from 'react';
import Window from "../../components/Window/Window";
-import ContentSection from "../../components/ContentSection/ContentSection";
import {
- TextField,
- Button,
- Typography,
makeStyles,
} from "@material-ui/core";
+import Registration from "./Registration/Registration";
+import ContentSection from "../../components/ContentSection/ContentSection";
const useStyles = makeStyles(theme => ({
@@ -16,22 +14,22 @@ const useStyles = makeStyles(theme => ({
},
}));
-const Profile = () => {
+
+const Profile = ({ user, setUser }) => {
const classes = useStyles();
return (
<>
<Window type="primary">
<div className={classes.primary}>
- <ContentSection sectionName="Tell us who you are">
- <p> Here is some text about why you should register at ChronoCube: </p>
- <p>
- <TextField variant="outlined" color="secondary" label="Username" />
- </p>
- <Button variant="contained" color="secondary" size="large">
- Submit!
- </Button>
- </ContentSection>
+ { user.id? (
+ <ContentSection sectionName={`Welcome back, ${user.username}`}>
+
+ </ContentSection>
+ ): (
+ <Registration setUser={setUser} />
+ )
+ }
</div>
</Window>
<Window type="secondary" name="History">