You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
1.4 KiB

  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.isRequired,
  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. <Avatar src={this.props.account.get('avatar')} animate size={40} />
  19. </Permalink>
  20. <div className='navigation-bar__profile'>
  21. <Permalink href={this.props.account.get('url')} to={`/accounts/${this.props.account.get('id')}`}>
  22. <strong className='navigation-bar__profile-account'>@{this.props.account.get('acct')}</strong>
  23. </Permalink>
  24. <a href='/settings/profile' className='navigation-bar__profile-edit'><FormattedMessage id='navigation_bar.edit_profile' defaultMessage='Edit profile' /></a>
  25. </div>
  26. <IconButton title='' icon='close' onClick={this.props.onClose} />
  27. </div>
  28. );
  29. }
  30. }