aboutsummaryrefslogtreecommitdiff
path: root/src/pages/Profile/Profile.js
blob: f2c44ef075440f8d4f557203d2dcb7dcd7a819aa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import React from 'react';
import Window from "../../components/Window/Window";

import {
  makeStyles,
} from "@material-ui/core";
import Registration from "./Registration/Registration";
import ContentSection from "../../components/ContentSection/ContentSection";


const useStyles = makeStyles(theme => ({
  primary: {
    padding: theme.spacing(4)
  },
}));


const Profile = ({ user, setUser }) => {
  const classes = useStyles();

  return (
    <>
      <Window type="primary">
        <div className={classes.primary}>
          { user.id? (
            <ContentSection sectionName={`Welcome back, ${user.username}`}>

            </ContentSection>
          ): (
            <Registration setUser={setUser} />
          )
          }
        </div>
      </Window>
      <Window type="secondary" name="History">

      </Window>
    </>
  )
};


export default Profile;