Skip to content

Commit

Permalink
chore: quick-strategy - fix breaking dbot (deriv-com#10944)
Browse files Browse the repository at this point in the history
  • Loading branch information
sandeep-deriv authored Oct 25, 2023
1 parent 4d5933a commit b66ad9b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion packages/bot-web-ui/src/components/dashboard/dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const Dashboard = observer(() => {
}, []);

React.useEffect(() => {
if (is_strategy_modal_open) {
if (is_open) {
setTourDialogVisibility(false);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -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<number>(1);
const content_data = BOT_BUILDER_MOBILE.find(({ tour_step_key }) => {
return tour_step_key === tour_step;
Expand All @@ -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);
Expand Down

0 comments on commit b66ad9b

Please sign in to comment.