2017-05-03 03:04:16 +03:00
|
|
|
import React from 'react';
|
2016-09-13 03:24:40 +03:00
|
|
|
import ImmutablePropTypes from 'react-immutable-proptypes';
|
2016-12-02 16:05:50 +02:00
|
|
|
import Avatar from '../../../components/avatar';
|
|
|
|
import Permalink from '../../../components/permalink';
|
2016-11-16 18:20:52 +02:00
|
|
|
import { FormattedMessage } from 'react-intl';
|
2017-05-03 03:04:16 +03:00
|
|
|
import ImmutablePureComponent from 'react-immutable-pure-component';
|
2016-09-13 03:24:40 +03:00
|
|
|
|
2017-06-23 20:36:54 +03:00
|
|
|
export default class NavigationBar extends ImmutablePureComponent {
|
2016-09-13 03:24:40 +03:00
|
|
|
|
2017-05-12 15:44:10 +03:00
|
|
|
static propTypes = {
|
2017-05-20 18:31:47 +03:00
|
|
|
account: ImmutablePropTypes.map.isRequired,
|
2017-05-12 15:44:10 +03:00
|
|
|
};
|
|
|
|
|
2016-09-13 03:24:40 +03:00
|
|
|
render () {
|
|
|
|
return (
|
2017-02-09 02:20:09 +02:00
|
|
|
<div className='navigation-bar'>
|
2017-05-03 03:04:16 +03:00
|
|
|
<Permalink href={this.props.account.get('url')} to={`/accounts/${this.props.account.get('id')}`}>
|
2017-07-10 11:26:46 +03:00
|
|
|
<Avatar src={this.props.account.get('avatar')} staticSrc={this.props.account.get('avatar_static')} size={40} />
|
2017-05-03 03:04:16 +03:00
|
|
|
</Permalink>
|
2016-09-13 03:24:40 +03:00
|
|
|
|
2017-04-23 05:26:55 +03:00
|
|
|
<div className='navigation-bar__profile'>
|
2017-04-25 05:45:27 +03: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-03 03:04:16 +03:00
|
|
|
|
2017-04-23 05:26:55 +03:00
|
|
|
<a href='/settings/profile' className='navigation-bar__profile-edit'><FormattedMessage id='navigation_bar.edit_profile' defaultMessage='Edit profile' /></a>
|
2016-09-13 03:24:40 +03:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2017-04-21 21:05:35 +03:00
|
|
|
}
|