The code powering m.abunchtell.com https://m.abunchtell.com
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.
 
 
 
 

39 rivejä
1.5 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. <span style={{ display: 'none' }}>{this.props.account.get('acct')}</span>
  19. <Avatar src={this.props.account.get('avatar')} animate 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. }