import React from 'react'; import Logo from 'mastodon/components/logo'; import { Link, withRouter } from 'react-router-dom'; import { FormattedMessage } from 'react-intl'; import { registrationsOpen, me } from 'mastodon/initial_state'; import Avatar from 'mastodon/components/avatar'; import Permalink from 'mastodon/components/permalink'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; const Account = connect(state => ({ account: state.getIn(['accounts', me]), }))(({ account }) => ( )); export default @withRouter class Header extends React.PureComponent { static contextTypes = { identity: PropTypes.object, }; static propTypes = { location: PropTypes.object, }; render () { const { signedIn } = this.context.identity; const { location } = this.props; let content; if (signedIn) { content = ( <> {location.pathname !== '/publish' && } ); } else { content = ( <> ); } return (
{content}
); } }