1
0
mirror of https://github.com/trezor/trezor-wallet synced 2024-12-29 02:18:06 +00:00
This commit is contained in:
Vladimir Volek 2018-11-15 16:19:04 +01:00
parent 83e46bd012
commit f93eb3bebd
3 changed files with 13 additions and 6 deletions

View File

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

View File

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

View File

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