From 9c00ed2dc1b9144f340e0a5e8679d43e12f7ef11 Mon Sep 17 00:00:00 2001 From: Shlok Amin Date: Mon, 26 Jun 2023 11:55:12 -0400 Subject: [PATCH] fix(app): update ODD unfinished route path when update not necessary --- .../organisms/UpdateRobotSoftware/NoUpdateFound.tsx | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/app/src/organisms/UpdateRobotSoftware/NoUpdateFound.tsx b/app/src/organisms/UpdateRobotSoftware/NoUpdateFound.tsx index e778a7126a3..c9e22891125 100644 --- a/app/src/organisms/UpdateRobotSoftware/NoUpdateFound.tsx +++ b/app/src/organisms/UpdateRobotSoftware/NoUpdateFound.tsx @@ -1,5 +1,6 @@ import * as React from 'react' import { useTranslation } from 'react-i18next' +import { useDispatch } from 'react-redux' import { useHistory } from 'react-router-dom' import { @@ -16,10 +17,12 @@ import { import { StyledText } from '../../atoms/text' import { MediumButton } from '../../atoms/buttons' +import { updateConfigValue } from '../../redux/config' export function NoUpdateFound(): JSX.Element { const { i18n, t } = useTranslation(['device_settings', 'shared']) const history = useHistory() + const dispatch = useDispatch() return ( history.push('/robot-settings/rename-robot')} + onClick={() => { + dispatch( + updateConfigValue( + 'onDeviceDisplaySettings.unfinishedUnboxingFlowRoute', + '/robot-settings/rename-robot' + ) + ) + history.push('/robot-settings/rename-robot') + }} /> )