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 { disabledWallets?: string[]; } export const OfflineAwareUnlockHeader: React.SFC = ({ disabledWallets }) => ( } disabledWallets={disabledWallets} /> ); 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);