logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe git clone https://hacktivis.me/git/mastofe.git

navigation_bar.js (1488B)


  1. import React from 'react';
  2. import PropTypes from 'prop-types';
  3. import ImmutablePropTypes from 'react-immutable-proptypes';
  4. import Avatar from '../../../components/avatar';
  5. import IconButton from '../../../components/icon_button';
  6. import Permalink from '../../../components/permalink';
  7. import { FormattedMessage } from 'react-intl';
  8. import ImmutablePureComponent from 'react-immutable-pure-component';
  9. export default class NavigationBar extends ImmutablePureComponent {
  10. static propTypes = {
  11. account: ImmutablePropTypes.map.isRequired,
  12. onClose: PropTypes.func,
  13. };
  14. render () {
  15. return (
  16. <div className='navigation-bar'>
  17. <Permalink href={this.props.account.get('url')} to={`/accounts/${this.props.account.get('id')}`}>
  18. <span style={{ display: 'none' }}>{this.props.account.get('acct')}</span>
  19. <Avatar account={this.props.account} size={40} />
  20. </Permalink>
  21. <div className='navigation-bar__profile'>
  22. <Permalink href={this.props.account.get('url')} to={`/accounts/${this.props.account.get('id')}`}>
  23. <strong className='navigation-bar__profile-account'>@{this.props.account.get('acct')}</strong>
  24. </Permalink>
  25. <a href='/settings/profile' className='navigation-bar__profile-edit'><FormattedMessage id='navigation_bar.edit_profile' defaultMessage='Edit profile' /></a>
  26. </div>
  27. <IconButton title='' icon='close' onClick={this.props.onClose} />
  28. </div>
  29. );
  30. }
  31. }