From 19dbf88d3c24330c5aa0009137db3c337ccde9e7 Mon Sep 17 00:00:00 2001 From: slowbackspace Date: Sun, 24 Feb 2019 22:51:51 +0100 Subject: [PATCH] add NoBackup notification --- .../App/components/NoBackup/index.js | 25 +++++++++++++++++++ src/components/notifications/App/index.js | 2 ++ 2 files changed, 27 insertions(+) create mode 100644 src/components/notifications/App/components/NoBackup/index.js diff --git a/src/components/notifications/App/components/NoBackup/index.js b/src/components/notifications/App/components/NoBackup/index.js new file mode 100644 index 00000000..494bb9d9 --- /dev/null +++ b/src/components/notifications/App/components/NoBackup/index.js @@ -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 ( + {}, //TODO + }] + } + /> + ); +}; \ No newline at end of file diff --git a/src/components/notifications/App/index.js b/src/components/notifications/App/index.js index 6167cfcf..d7c91180 100644 --- a/src/components/notifications/App/index.js +++ b/src/components/notifications/App/index.js @@ -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; @@ -33,6 +34,7 @@ const Notifications = (props: Props) => ( + );