import { UnlockHeader } from 'components/ui'; import React, { Component } from 'react'; import translate from 'translations'; import { isAnyOffline } from 'selectors/config'; import { connect } from 'react-redux'; import { AppState } from 'reducers'; interface Props { allowReadOnly: boolean; } export const OfflineAwareUnlockHeader: React.SFC = ({ allowReadOnly }) => ( } allowReadOnly={allowReadOnly} /> ); interface StateProps { shouldDisplayOffline: boolean; } class TitleClass extends Component { public render() { const { shouldDisplayOffline } = this.props; const offlineTitle = shouldDisplayOffline ? ( (Offline) ) : null; return (
{translate('Account')} {offlineTitle}
); } } const Title = connect((state: AppState) => ({ shouldDisplayOffline: isAnyOffline(state) }))(TitleClass);