diff --git a/src/actions/SelectedAccountActions.js b/src/actions/SelectedAccountActions.js index b170a453..409ae846 100644 --- a/src/actions/SelectedAccountActions.js +++ b/src/actions/SelectedAccountActions.js @@ -28,9 +28,9 @@ export type SelectedAccountAction = { }; type AccountStatus = { - type: string; // notification type - title: string; // notification title - message?: string; // notification message + type: ?string; // notification type + title: ?string; // notification title + message?: ?string; // notification message shouldRender: boolean; // should render account page } diff --git a/src/components/Notification/index.js b/src/components/Notification/index.js index fdff20e7..cd3caa3f 100644 --- a/src/components/Notification/index.js +++ b/src/components/Notification/index.js @@ -19,7 +19,7 @@ type Props = { cancelable?: boolean; title: string; className?: string; - message?: string; + message?: ?string; actions?: Array; close?: typeof NotificationActions.close, loading?: boolean diff --git a/src/components/notifications/Context/components/Account/index.js b/src/components/notifications/Context/components/Account/index.js index 90dc4ced..3b8e4709 100644 --- a/src/components/notifications/Context/components/Account/index.js +++ b/src/components/notifications/Context/components/Account/index.js @@ -7,7 +7,7 @@ import type { Props } from '../../index'; // There could be only one account notification export default (props: Props) => { const { network, notification } = props.selectedAccount; - if (network && notification.type && notification.type !== 'loader-progress' && notification.type !== 'loader-info') { + if (network && notification.type && notification.title && notification.type !== 'loader-progress' && notification.type !== 'loader-info') { if (notification.type === 'backend') { // special case: backend is down // TODO: this is a different component with "auto resolve" button @@ -27,7 +27,14 @@ export default (props: Props) => { /> ); } - return (); + return ( + + ); } + return null; }; \ No newline at end of file