mirror of
https://github.com/trezor/trezor-wallet
synced 2025-05-28 11:48:48 +00:00
add NoBackup notification
This commit is contained in:
parent
40790470c2
commit
19dbf88d3c
@ -0,0 +1,25 @@
|
||||
/* @flow */
|
||||
import * as React from 'react';
|
||||
import Notification from 'components/Notification';
|
||||
|
||||
import type { Props } from '../../index';
|
||||
|
||||
export default (props: Props) => {
|
||||
const { selectedDevice } = props.wallet;
|
||||
const needsBackup = selectedDevice && selectedDevice.features && selectedDevice.features.needs_backup;
|
||||
if (!needsBackup) return null;
|
||||
return (
|
||||
<Notification
|
||||
key="needs-backup"
|
||||
type="warning"
|
||||
title="Your Trezor is not backed up!"
|
||||
message="If your device is ever lost or damaged, your funds will be lost. Backup your device first, to protect your coins against such events."
|
||||
actions={
|
||||
[{
|
||||
label: 'Create a backup',
|
||||
callback: () => {}, //TODO
|
||||
}]
|
||||
}
|
||||
/>
|
||||
);
|
||||
};
|
@ -12,6 +12,7 @@ import * as RouterActions from 'actions/RouterActions';
|
||||
import OnlineStatus from './components/OnlineStatus';
|
||||
import UpdateBridge from './components/UpdateBridge';
|
||||
import UpdateFirmware from './components/UpdateFirmware';
|
||||
import NoBackup from './components/NoBackup';
|
||||
|
||||
export type StateProps = {
|
||||
connect: $ElementType<State, 'connect'>;
|
||||
@ -33,6 +34,7 @@ const Notifications = (props: Props) => (
|
||||
<OnlineStatus {...props} />
|
||||
<UpdateBridge {...props} />
|
||||
<UpdateFirmware {...props} />
|
||||
<NoBackup {...props} />
|
||||
</React.Fragment>
|
||||
);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user