content: import React from 'react';
  import { connect } from 'react-redux';
  import PropTypes from 'prop-types';
  import MenuPage from '../shared/MenuPage';
  
  
  const ProfilePage = ({ user }) => {
  
    return (
      <div className="container">
        <div className="row">
          <aside className="col-md-3">
            <MenuPage />
          </aside>
          <section className="col-md-9">
            <div className="panel panel-padding panel-margin panel-default">
              <h3>Profile</h3>
              <hr />
              <p>
                <strong>Name: </strong>
                {user.username}</p>
              <p>
                <strong>Role: </strong>
                {user.isAdmin
                  ? 'Administrator'
                  : 'User'}
              </p>
              <p>
                <strong>Registration Date: </strong>
                {user.registrationDate && user.registrationDate.substring(0, 10)}
              </p>
            </div>
          </section>
        </div>
      </div>
    );
  };
  
  function mapStateToProps(state) {
    return { user: state.auth.user };
  }
  
  ProfilePage.propTypes = {
    user: PropTypes.object.isRequired
  };
  
  export default connect(mapStateToProps, {})(ProfilePage);
  