diff options
Diffstat (limited to 'src/pages/Profile/Profile.js')
-rw-r--r-- | src/pages/Profile/Profile.js | 26 |
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"> |