Skip to content
Snippets Groups Projects
Commit 791f7ae8 authored by Damien's avatar Damien
Browse files

Debeug button

parent 8b50e464
Branches
No related tags found
No related merge requests found
......@@ -11,12 +11,16 @@ import logo from './image/logo.png'
function App() {
return (
<div style={{verticalAlign:"center"}}>
<Image src={logo} alt="Logo" href="/" style={{marginLeft:'30%', width:'40%'}} />
<div >
<div style={{textAlign:"center"}}>
<Image src={logo} alt="Logo" href="/" style={{ width:'40%'}} />
</div>
<Router >
<Link to="/admin" style={{float:"right", margin:"2em"}} >
<div style={{textAlign:"right"}}>
<Link to="/admin" style={{position:"absolute",top:'2em' ,right:"2em"}} >
<Button icon="male" content="Espace admin"/>
</Link>
</div>
<Route exact path='/' component={AllToucanPage} />
<Route exact path='/admin' render={()=>isLogged() ? <AdminPage/> : window.location=`${env.backURL}/oauth/login`}/>
<Route exact path='/login/:token' component={Login} />
......
......@@ -5,7 +5,7 @@ class Login extends Component {
componentDidMount(){
localStorage.setItem("token",this.props.match.params.token);
console.log(localStorage.getItem("token"));
window.location = '/';
window.location = '/admin';
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment