mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-12-12 06:19:03 +01:00
f5bf5ebb82
* Replace browserify with webpack * Add react-intl-translations-manager * Do not minify in development, add offline-plugin for ServiceWorker background cache updates * Adjust tests and dependencies * Fix production deployments * Fix tests * More optimizations * Improve travis cache for npm stuff * Re-run travis * Add back support for custom.scss as before * Remove offline-plugin and babili * Fix issue with Immutable.List().unshift(...values) not working as expected * Make travis load schema instead of running all migrations in sequence * Fix missing React import in WarningContainer. Optimize rendering performance by using ImmutablePureComponent instead of React.PureComponent. ImmutablePureComponent uses Immutable.is() to compare props. Replace dynamic callback bindings in <UI /> * Add react definitions to places that use JSX * Add Procfile.dev for running rails, webpack and streaming API at the same time
37 lines
1.4 KiB
JavaScript
37 lines
1.4 KiB
JavaScript
import React from 'react';
|
|
import ImmutablePropTypes from 'react-immutable-proptypes';
|
|
import Avatar from '../../../components/avatar';
|
|
import IconButton from '../../../components/icon_button';
|
|
import DisplayName from '../../../components/display_name';
|
|
import Permalink from '../../../components/permalink';
|
|
import { FormattedMessage } from 'react-intl';
|
|
import { Link } from 'react-router';
|
|
import ImmutablePureComponent from 'react-immutable-pure-component';
|
|
|
|
class NavigationBar extends ImmutablePureComponent {
|
|
|
|
render () {
|
|
return (
|
|
<div className='navigation-bar'>
|
|
<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>
|
|
|
|
<div className='navigation-bar__profile'>
|
|
<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>
|
|
|
|
<a href='/settings/profile' className='navigation-bar__profile-edit'><FormattedMessage id='navigation_bar.edit_profile' defaultMessage='Edit profile' /></a>
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|
|
|
|
}
|
|
|
|
NavigationBar.propTypes = {
|
|
account: ImmutablePropTypes.map.isRequired
|
|
};
|
|
|
|
export default NavigationBar;
|