mirror of
https://github.com/trezor/trezor-wallet
synced 2024-12-30 19:00:53 +00:00
Fix flow
This commit is contained in:
parent
83e46bd012
commit
f93eb3bebd
@ -28,9 +28,9 @@ export type SelectedAccountAction = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
type AccountStatus = {
|
type AccountStatus = {
|
||||||
type: string; // notification type
|
type: ?string; // notification type
|
||||||
title: string; // notification title
|
title: ?string; // notification title
|
||||||
message?: string; // notification message
|
message?: ?string; // notification message
|
||||||
shouldRender: boolean; // should render account page
|
shouldRender: boolean; // should render account page
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ type Props = {
|
|||||||
cancelable?: boolean;
|
cancelable?: boolean;
|
||||||
title: string;
|
title: string;
|
||||||
className?: string;
|
className?: string;
|
||||||
message?: string;
|
message?: ?string;
|
||||||
actions?: Array<CallbackAction>;
|
actions?: Array<CallbackAction>;
|
||||||
close?: typeof NotificationActions.close,
|
close?: typeof NotificationActions.close,
|
||||||
loading?: boolean
|
loading?: boolean
|
||||||
|
@ -7,7 +7,7 @@ import type { Props } from '../../index';
|
|||||||
// There could be only one account notification
|
// There could be only one account notification
|
||||||
export default (props: Props) => {
|
export default (props: Props) => {
|
||||||
const { network, notification } = props.selectedAccount;
|
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') {
|
if (notification.type === 'backend') {
|
||||||
// special case: backend is down
|
// special case: backend is down
|
||||||
// TODO: this is a different component with "auto resolve" button
|
// 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;
|
return null;
|
||||||
};
|
};
|
Loading…
Reference in New Issue
Block a user