2017-05-02 20:04:16 -04:00
|
|
|
import React from 'react';
|
2016-09-12 20:24:40 -04:00
|
|
|
import ImmutablePropTypes from 'react-immutable-proptypes';
|
2016-12-02 09:05:50 -05:00
|
|
|
import Avatar from '../../../components/avatar';
|
2016-11-16 11:20:52 -05:00
|
|
|
import IconButton from '../../../components/icon_button';
|
|
|
|
import DisplayName from '../../../components/display_name';
|
2016-12-02 09:05:50 -05:00
|
|
|
import Permalink from '../../../components/permalink';
|
2016-11-16 11:20:52 -05:00
|
|
|
import { FormattedMessage } from 'react-intl';
|
2017-05-18 13:14:03 -04:00
|
|
|
import Link from 'react-router/lib/Link';
|
2017-05-02 20:04:16 -04:00
|
|
|
import ImmutablePureComponent from 'react-immutable-pure-component';
|
2016-09-12 20:24:40 -04:00
|
|
|
|
2017-05-02 20:04:16 -04:00
|
|
|
class NavigationBar extends ImmutablePureComponent {
|
2016-09-12 20:24:40 -04:00
|
|
|
|
2017-05-12 08:44:10 -04:00
|
|
|
static propTypes = {
|
|
|
|
account: ImmutablePropTypes.map.isRequired
|
|
|
|
};
|
|
|
|
|
2016-09-12 20:24:40 -04:00
|
|
|
render () {
|
|
|
|
return (
|
2017-02-08 19:20:09 -05:00
|
|
|
<div className='navigation-bar'>
|
2017-05-02 20:04:16 -04:00
|
|
|
<Permalink href={this.props.account.get('url')} to={`/accounts/${this.props.account.get('id')}`}>
|
|
|
|
<Avatar src={this.props.account.get('avatar')} animate size={40} />
|
|
|
|
</Permalink>
|
2016-09-12 20:24:40 -04:00
|
|
|
|
2017-04-22 22:26:55 -04:00
|
|
|
<div className='navigation-bar__profile'>
|
2017-04-24 22:45:27 -04:00
|
|
|
<Permalink href={this.props.account.get('url')} to={`/accounts/${this.props.account.get('id')}`}>
|
|
|
|
<strong className='navigation-bar__profile-account'>@{this.props.account.get('acct')}</strong>
|
|
|
|
</Permalink>
|
2017-05-02 20:04:16 -04:00
|
|
|
|
2017-04-22 22:26:55 -04:00
|
|
|
<a href='/settings/profile' className='navigation-bar__profile-edit'><FormattedMessage id='navigation_bar.edit_profile' defaultMessage='Edit profile' /></a>
|
2016-09-12 20:24:40 -04:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2017-04-21 14:05:35 -04:00
|
|
|
}
|
|
|
|
|
2016-09-12 20:24:40 -04:00
|
|
|
export default NavigationBar;
|