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.

32 lines
1.2 KiB

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