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