add NoBackup notification

pull/392/head
slowbackspace 5 years ago
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…
Cancel
Save