Guest User

Untitled

a guest
Jun 25th, 2018
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. import React from 'react';
  2. import { Button } from "react-bootstrap";
  3.  
  4. import API from '../../utils/API';
  5.  
  6. export class Dashboard extends React.Component {
  7. constructor(props){
  8. super(props);
  9. this.disconnect.bind(this);
  10. }
  11. disconnect = event => {
  12. API.logout();
  13. window.location = "/";
  14. }
  15. render() {
  16. return(
  17. <div className="Dashboard">
  18. <h1>Dashboard</h1>
  19. <Button
  20. onClick={this.disconnect}
  21. block
  22. bsSize="large"
  23. type="submit"
  24. >
  25. Se déconnecter
  26. </Button>
  27. </div>
  28. )
  29. }
  30. }
Add Comment
Please, Sign In to add comment