Commit 7f77eebd authored by Vincent Seyller's avatar Vincent Seyller
Browse files

Stylize connection

parent 3ea1996c
[{"C:\\Users\\vseyl\\Desktop\\Cours\\LP2\\ShareLoc-React\\src\\index.js":"1","C:\\Users\\vseyl\\Desktop\\Cours\\LP2\\ShareLoc-React\\src\\App.js":"2","C:\\Users\\vseyl\\Desktop\\Cours\\LP2\\ShareLoc-React\\src\\reportWebVitals.js":"3","C:\\Users\\vseyl\\Desktop\\Cours\\LP2\\ShareLoc-React\\src\\Signin.js":"4","C:\\Users\\vseyl\\Desktop\\Cours\\LP2\\ShareLoc-React\\src\\Signup.js":"5","C:\\Users\\vseyl\\Desktop\\Cours\\LP2\\ShareLoc-React\\src\\ShareLoc.js":"6"},{"size":500,"mtime":499162500000,"results":"7","hashOfConfig":"8"},{"size":295,"mtime":1611066401392,"results":"9","hashOfConfig":"8"},{"size":362,"mtime":499162500000,"results":"10","hashOfConfig":"8"},{"size":1302,"mtime":1611060947418,"results":"11","hashOfConfig":"8"},{"size":1965,"mtime":1611060929098,"results":"12","hashOfConfig":"8"},{"size":4358,"mtime":1611067810250,"results":"13","hashOfConfig":"8"},{"filePath":"14","messages":"15","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"16"},"1gwdenx",{"filePath":"17","messages":"18","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"19","messages":"20","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"16"},{"filePath":"21","messages":"22","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"16"},{"filePath":"23","messages":"24","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"16"},{"filePath":"25","messages":"26","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"C:\\Users\\vseyl\\Desktop\\Cours\\LP2\\ShareLoc-React\\src\\index.js",[],["27","28"],"C:\\Users\\vseyl\\Desktop\\Cours\\LP2\\ShareLoc-React\\src\\App.js",[],"C:\\Users\\vseyl\\Desktop\\Cours\\LP2\\ShareLoc-React\\src\\reportWebVitals.js",[],"C:\\Users\\vseyl\\Desktop\\Cours\\LP2\\ShareLoc-React\\src\\Signin.js",[],"C:\\Users\\vseyl\\Desktop\\Cours\\LP2\\ShareLoc-React\\src\\Signup.js",[],"C:\\Users\\vseyl\\Desktop\\Cours\\LP2\\ShareLoc-React\\src\\ShareLoc.js",[],{"ruleId":"29","replacedBy":"30"},{"ruleId":"31","replacedBy":"32"},"no-native-reassign",["33"],"no-negated-in-lhs",["34"],"no-global-assign","no-unsafe-negation"]
\ No newline at end of file
[{"C:\\Users\\vseyl\\Desktop\\Cours\\LP2\\ShareLoc-React\\src\\index.js":"1","C:\\Users\\vseyl\\Desktop\\Cours\\LP2\\ShareLoc-React\\src\\App.js":"2","C:\\Users\\vseyl\\Desktop\\Cours\\LP2\\ShareLoc-React\\src\\reportWebVitals.js":"3","C:\\Users\\vseyl\\Desktop\\Cours\\LP2\\ShareLoc-React\\src\\Signin.js":"4","C:\\Users\\vseyl\\Desktop\\Cours\\LP2\\ShareLoc-React\\src\\Signup.js":"5","C:\\Users\\vseyl\\Desktop\\Cours\\LP2\\ShareLoc-React\\src\\ShareLoc.js":"6"},{"size":500,"mtime":499162500000,"results":"7","hashOfConfig":"8"},{"size":295,"mtime":1611066401392,"results":"9","hashOfConfig":"8"},{"size":362,"mtime":499162500000,"results":"10","hashOfConfig":"8"},{"size":1302,"mtime":1611060947418,"results":"11","hashOfConfig":"8"},{"size":1965,"mtime":1611060929098,"results":"12","hashOfConfig":"8"},{"size":4616,"mtime":1611068311406,"results":"13","hashOfConfig":"8"},{"filePath":"14","messages":"15","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"16"},"1gwdenx",{"filePath":"17","messages":"18","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"16"},{"filePath":"19","messages":"20","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"16"},{"filePath":"21","messages":"22","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"16"},{"filePath":"23","messages":"24","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"16"},{"filePath":"25","messages":"26","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"C:\\Users\\vseyl\\Desktop\\Cours\\LP2\\ShareLoc-React\\src\\index.js",[],["27","28"],"C:\\Users\\vseyl\\Desktop\\Cours\\LP2\\ShareLoc-React\\src\\App.js",[],"C:\\Users\\vseyl\\Desktop\\Cours\\LP2\\ShareLoc-React\\src\\reportWebVitals.js",[],"C:\\Users\\vseyl\\Desktop\\Cours\\LP2\\ShareLoc-React\\src\\Signin.js",[],"C:\\Users\\vseyl\\Desktop\\Cours\\LP2\\ShareLoc-React\\src\\Signup.js",[],"C:\\Users\\vseyl\\Desktop\\Cours\\LP2\\ShareLoc-React\\src\\ShareLoc.js",[],{"ruleId":"29","replacedBy":"30"},{"ruleId":"31","replacedBy":"32"},"no-native-reassign",["33"],"no-negated-in-lhs",["34"],"no-global-assign","no-unsafe-negation"]
\ No newline at end of file
......@@ -6,18 +6,32 @@ import {
import {useEffect, useState} from 'react';
import {AppBar, Toolbar, Typography, Button} from '@material-ui/core'
import {AppBar, Toolbar, Typography, Button, makeStyles} from '@material-ui/core'
import './App.css'
import Signin from './Signin.js'
import Signup from './Signup.js'
let useStyles = makeStyles((theme) => ({
root: {
flexGrow: 1,
},
menuButton: {
marginRight: theme.spacing(2),
},
title: {
flexGrow: 1,
},
}));
let ShareLoc = () => {
let history = useHistory();
let [user, setUser] = useState(null);
let [userCheck, setUserCheck] = useState(false);
let [token, setToken] = useState('');
let classes = useStyles();
let ApiURL = 'http://localhost:8080/ShareLoc/api';
......@@ -88,29 +102,28 @@ let ShareLoc = () => {
return (
<div>
{ userCheck ? 'Checking for Authentification...' :
<div>
<div className={classes.root}>
<AppBar position='static'>
<Toolbar>
<ul>
{user ?
<div>
{/* <li>
<Link to='/colocations/'>Your colocations</Link>
</li> */}
<Typography variant="h6">
Connected as {user.email} <Button variant="contained" color="secondary" onClick={signout}>Signout</Button>
<>
<Button color="inherit" href='/colocations'>
Colocations
</Button>
<Typography variant="h6" className={classes.title}>
Connected as {user.email}
</Typography>
</div> :
<div>
<Button variant="contained" color="secondary" onClick={signout}>Signout</Button>
</> :
<>
<Button color="inherit" href='/Signin'>
Signin
</Button>
<Button color="inherit" href='/Signup'>
Signup
</Button>
</div>
</>
}
</ul>
</Toolbar>
</AppBar>
<Switch>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment