pull/287/head
Vladimir Volek 6 years ago committed by Szymon Lesisz
parent 691eaccf9e
commit 4c6cb7e1fc

@ -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
}

@ -17,7 +17,7 @@ type Props = {
cancelable?: boolean;
title: string;
className?: string;
message?: string;
message?: ?string;
actions?: Array<CallbackAction>;
close?: typeof NotificationActions.close,
loading?: boolean

@ -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 (<Notification type={notification.type} title={notification.title} message={notification.message} />);
return (
<Notification
type={notification.type}
title={notification.title}
message={notification.message}
/>
);
}
return null;
};
Loading…
Cancel
Save