{"size": 1329, "ext": "js", "max_stars_repo_path": "src/components/sidenav/sidenav.js", "max_stars_repo_name": "carlosestrada22/quiz", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/components/sidenav/sidenav.js", "max_issues_repo_name": "carlosestrada22/quiz", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/components/sidenav/sidenav.js", "max_forks_repo_name": "carlosestrada22/quiz", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 35.9189189189, "max_line_length": 147, "alphanum_fraction": 0.5154251317}
import React, { Component } from 'react';
import './sidenav.css'

class Sidenav extends Component {
    constructor(props) {
        super(props)
        this.state = {
        }
    }
    componentDidMount() {
        // Initialize collapse button
        this.props.$(".button-collapse").sideNav();
        // Initialize collapsible (uncomment the line below if you use the dropdown variation)
        //$('.collapsible').collapsible();
    }
    render() {
        return (
            <div id="sidenav" className="barra-lateral">
                <ul id="slide-out" className="side-nav">
                    <li>
                        <div className="user-view">
                            <img src={getUrlImg(this.props.PerfilFb)} data-reactid=".0.0" alt="profile-pic"/>
                        </div>
                    </li>
                    <li>{this.props.PerfilFb.name}</li>
                    <li><div className="divider"></div></li>
                    <li>{this.props.PerfilFb.email}</li>
                </ul>
                <a id="btn-barra-lateral" href="" data-activates="slide-out" className="button-collapse"><i className="material-icons">menu</i></a>
            </div>
        )
    }
}
const getUrlImg = (perfil) => {
    return perfil.picture ? perfil.picture.data.url : ""
}
export default Sidenav