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 ImmutablePropTypes from 'react-immutable-proptypes';
  3. import Avatar from '../../../components/avatar';
  4. import IconButton from '../../../components/icon_button';
  5. import DisplayName from '../../../components/display_name';
  6. import Permalink from '../../../components/permalink';
  7. import { FormattedMessage } from 'react-intl';
  8. import { Link } from 'react-router';
  9. import ImmutablePureComponent from 'react-immutable-pure-component';
  10. class NavigationBar extends ImmutablePureComponent {
  11. static propTypes = {
  12. account: ImmutablePropTypes.map.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. </div>
  27. );
  28. }
  29. }
  30. export default NavigationBar;