Commit 3b101c24 authored by Damien's avatar Damien
Browse files

Button Logout added

parent 57e02899
import React,{Component} from 'react';
import {Button, Icon} from 'semantic-ui-react';
import env from '../.env';
class LogoutButton extends Component {
logOut() {
localStorage.removeItem("token");
window.location=`${env.logOutURL}?redirect_logout=${env.frontURL}`
}
render() {
return <Button
style={this.props.style}
onClick={this.logOut}
color="violet"
icon>
<Icon name="power" style={{ paddingRight:"2em" }}/>
Déconexion
</Button>
}
}
export default LogoutButton
\ No newline at end of file
import React, {Component} from 'react';
import {Segment} from 'semantic-ui-react';
import ToucanTable from './showToucan/ToucanTable';
import FormToucan from './FormToucan'
import FormToucan from './FormToucan';
import LogoutButton from './LogoutButton';
class MainPage extends Component {
render(){
return (
<Segment.Group >
<Segment.Group >
<Segment padded style={{margin:"3%"}}>
<LogoutButton style={{float:"right"}}/>
<h2 style={{textAlign:"center"}}>Rajout de Toucan</h2>
<FormToucan />
</Segment>
......
Supports Markdown
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