all files / src/profile/components/ App.jsx

100% Statements 14/14
100% Branches 0/0
100% Functions 1/1
100% Lines 13/13
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 52 53 54                                                                                  
import React from 'react';
import PropTypes from 'prop-types';
import { Col, Row, Tabs, Tab, Panel } from 'react-bootstrap';
import Favorites from './Favorites';
import UserInfo from './UserInfo';
import Security from './Security';
import RecentActivity from './RecentActivity';
import CreatedContent from './CreatedContent';
import { t } from '../../locales';
 
const propTypes = {
  user: PropTypes.object.isRequired,
};
 
export default function App(props) {
  return (
    <div className="container app">
      <Row>
        <Col md={3}>
          <UserInfo user={props.user} />
        </Col>
        <Col md={9}>
          <Tabs id="options">
            <Tab eventKey={1} title={<div><i className="fa fa-star" /> {t('Favorites')}</div>}>
              <Panel><Favorites user={props.user} /></Panel>
            </Tab>
            <Tab
              eventKey={2}
              title={
                <div><i className="fa fa-paint-brush" /> {t('Created Content')}</div>
              }
            >
              <Panel>
                <CreatedContent user={props.user} />
              </Panel>
            </Tab>
            <Tab eventKey={3} title={<div><i className="fa fa-list" /> {t('Recent Activity')}</div>}>
              <Panel>
                <RecentActivity user={props.user} />
              </Panel>
            </Tab>
            <Tab eventKey={4} title={<div><i className="fa fa-lock" /> {t('Security & Access')}</div>}>
              <Panel>
                <Security user={props.user} />
              </Panel>
            </Tab>
          </Tabs>
        </Col>
      </Row>
    </div>
  );
}
App.propTypes = propTypes;