From b66ad9b38b6d6a0b8c9c151ef5c00c59e7fbb491 Mon Sep 17 00:00:00 2001 From: Sandeep Rajput <90243468+sandeep-deriv@users.noreply.github.com> Date: Wed, 25 Oct 2023 14:35:32 +0800 Subject: [PATCH] chore: quick-strategy - fix breaking dbot (#10944) --- .../bot-web-ui/src/components/dashboard/dashboard.tsx | 2 +- .../bot-builder-tour/bot-builder-tour-mobile.tsx | 9 +++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/packages/bot-web-ui/src/components/dashboard/dashboard.tsx b/packages/bot-web-ui/src/components/dashboard/dashboard.tsx index 8df1de4bca65..bdb484befe86 100644 --- a/packages/bot-web-ui/src/components/dashboard/dashboard.tsx +++ b/packages/bot-web-ui/src/components/dashboard/dashboard.tsx @@ -58,7 +58,7 @@ const Dashboard = observer(() => { }, []); React.useEffect(() => { - if (is_strategy_modal_open) { + if (is_open) { setTourDialogVisibility(false); } diff --git a/packages/bot-web-ui/src/components/dashboard/dbot-tours/bot-builder-tour/bot-builder-tour-mobile.tsx b/packages/bot-web-ui/src/components/dashboard/dbot-tours/bot-builder-tour/bot-builder-tour-mobile.tsx index ff870d72b814..b272ef49a847 100644 --- a/packages/bot-web-ui/src/components/dashboard/dbot-tours/bot-builder-tour/bot-builder-tour-mobile.tsx +++ b/packages/bot-web-ui/src/components/dashboard/dbot-tours/bot-builder-tour/bot-builder-tour-mobile.tsx @@ -1,12 +1,9 @@ import React from 'react'; - import { ProgressBarTracker } from '@deriv/components'; import { observer } from '@deriv/stores'; import { localize } from '@deriv/translations'; - -import { useDBotStore } from 'Stores/useDBotStore'; import { getSetting } from 'Utils/settings'; - +import { useDBotStore } from 'Stores/useDBotStore'; import Accordion from '../common/accordion'; import TourButton from '../common/tour-button'; import TourStartDialog from '../common/tour-start-dialog'; @@ -25,7 +22,7 @@ const BotBuilderTourMobile = observer(() => { setShowMobileTourDialog, setTourDialogVisibility, } = dashboard; - const { is_strategy_modal_open } = quick_strategy; + const { is_open } = quick_strategy; const [tour_step, setTourStep] = React.useState(1); const content_data = BOT_BUILDER_MOBILE.find(({ tour_step_key }) => { return tour_step_key === tour_step; @@ -40,7 +37,7 @@ const BotBuilderTourMobile = observer(() => { else toggleTourLoadModal(false); const token = getSetting('bot_builder_token'); if (!token && active_tab === 1) { - if (is_strategy_modal_open) { + if (is_open) { setTourDialogVisibility(false); } else { setTourDialogVisibility(true);