Commit 8b50e464 authored by Damien's avatar Damien
Browse files

Add link to admin

parent bc54d0b1
import React from 'react';
import {Image} from 'semantic-ui-react'
import { BrowserRouter as Router, Route } from 'react-router-dom';
import {Image, Button} from 'semantic-ui-react'
import { BrowserRouter as Router, Route,Link } from 'react-router-dom';
import './App.css';
import AdminPage from './view/AdminPage/AdminPage';
import AllToucanPage from './view/AllToucanPage/AllToucanPage';
......@@ -14,6 +14,9 @@ function App() {
<div style={{verticalAlign:"center"}}>
<Image src={logo} alt="Logo" href="/" style={{marginLeft:'30%', width:'40%'}} />
<Router >
<Link to="/admin" style={{float:"right", margin:"2em"}} >
<Button icon="male" content="Espace admin"/>
</Link>
<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} />
......
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