Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | 1x 6x 6x 1x 5x 5x 5x | import React from "react"; import { Row, Col } from "react-bootstrap"; import RoleBadge from "main/components/Profile/RoleBadge"; import { useCurrentUser } from "main/utils/currentUser"; import BasicLayout from "main/layouts/BasicLayout/BasicLayout"; import ReactJson from "react-json-view"; import CommonsCardBox from "main/components/Commons/CommonsCardBox"; const ProfilePage = () => { const { data: currentUser } = useCurrentUser(); if (!currentUser.loggedIn) { return ( <p>Not logged in.</p> ) } const { email, pictureUrl, fullName, commons } = currentUser.root.user; return ( <BasicLayout> <Row className="align-items-center profile-header mb-5 text-center text-md-left"> <Col md={2}> <img src={pictureUrl} alt="Profile" className="rounded-circle img-fluid profile-picture mb-3 mb-md-0" /> </Col> <Col md> <h2>{fullName}</h2> <p className="lead text-muted">{email}</p> <RoleBadge role={"ROLE_USER"} currentUser={currentUser} /> <RoleBadge role={"ROLE_MEMBER"} currentUser={currentUser} /> <RoleBadge role={"ROLE_ADMIN"} currentUser={currentUser} /> </Col> </Row> {commons && <Row className="align-items-center profile-header mb-5 text-center text-md-left"> {commons.map((common) => ( <CommonsCardBox key={common.id} commons={common} /> ))} </Row>} <Row className="text-left"> <ReactJson src={currentUser.root} /> </Row> </BasicLayout> ); }; export default ProfilePage; |