Advertisement
Guest User

Untitled

a guest
Feb 21st, 2018
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import React from 'react';
  2. import ReactDOM from 'react-dom';
  3.  
  4. import { Grid, Row, Col, PageHeader, Glyphicon, Button, ListGroup, ListGroupItem, Panel } from 'react-bootstrap';
  5. import { Link } from 'react-router-dom';
  6.  
  7. import { Meteor } from 'meteor/meteor';
  8. import './lobbyusercard.css'
  9. import UserPDFListTracker from './UserPDFListContainer';
  10.  
  11. // This is a Card that display user's infos and usefull
  12. // links in his lobby. The component is called by a
  13. // wrapper that fill the `this.props` by Meteor Data.
  14.  
  15. export default class LobbyUserCard extends React.Component {
  16.  
  17.     constructor(props) {
  18.         super(props);
  19.  
  20.         this.state = {
  21.             myUser: this.props.myUser
  22.             showPDFListTracker: false,
  23.         }
  24.     }
  25.  
  26.     render() {
  27.         return(
  28.             <Grid>
  29.                 <Row className="show-grid">
  30.                 <Col xs={12} md={4}>
  31.                     <Panel className="profile-panel">
  32.                         <Panel.Heading><h1><Glyphicon glyph="user" /> Mon profil</h1></Panel.Heading>
  33.                         <Panel.Body>Bienvenue, <strong> {this.props.myUser.profile.prenom} {this.props.myUser.profile.nom}</strong></Panel.Body>
  34.                         <ListGroup>
  35.                             <ListGroupItem href="#"><Glyphicon glyph="time"/> Mettre a jour mes moyens de paiement.</ListGroupItem>
  36.                             <ListGroupItem href="#" onClick={() => this.setState({ showPDFListTracker: true })><Glyphicon glyph="pencil"/> Editer mon profil</ListGroupItem>
  37.                             <ListGroupItem href="#"><Glyphicon glyph="off"/> Deconnexion</ListGroupItem>
  38.                         </ListGroup>
  39.                     </Panel>
  40.                 </Col>
  41.                 <Col xs={12} md={8}>
  42.                 <Link to="/onwork">
  43.                     <Button bsStyle="custom-new-pdf"><Glyphicon glyph="plus"/>Nouveau Statut </Button>
  44.                 </Link>
  45.                     { showPDFListTracker && <UserPDFListTracker/> }
  46.                 </Col>
  47.                 </Row>
  48.             </Grid>
  49.         );
  50.     }
  51. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement