diff --git a/src/actions/RouterActions.js b/src/actions/RouterActions.js index 3d501714..7fdeb835 100644 --- a/src/actions/RouterActions.js +++ b/src/actions/RouterActions.js @@ -347,6 +347,17 @@ export const gotoFirmwareUpdate = (): ThunkAction => (dispatch: Dispatch, getSta dispatch(goto(`/device/${devUrl}/firmware-update`)); }; +/* +* Go to NoBackup page +*/ +export const gotoBackup = (): ThunkAction => (dispatch: Dispatch, getState: GetState): void => { + const { selectedDevice } = getState().wallet; + if (!selectedDevice || !selectedDevice.features) return; + const devUrl: string = `${selectedDevice.features.device_id}${selectedDevice.instance ? `:${selectedDevice.instance}` : ''}`; + dispatch(goto(`/device/${devUrl}/backup`)); +}; + + /* * Try to redirect to initial url */ diff --git a/src/components/notifications/App/components/NoBackup/index.js b/src/components/notifications/App/components/NoBackup/index.js index 494bb9d9..5b7f2082 100644 --- a/src/components/notifications/App/components/NoBackup/index.js +++ b/src/components/notifications/App/components/NoBackup/index.js @@ -10,14 +10,14 @@ export default (props: Props) => { if (!needsBackup) return null; return ( {}, //TODO + callback: props.routerActions.gotoBackup, }] } />