From df868349d53bc5a55c3765a570cfb8c4b1eb7201 Mon Sep 17 00:00:00 2001 From: vinu-deriv <100689171+vinu-deriv@users.noreply.github.com> Date: Fri, 13 Oct 2023 07:07:11 +0000 Subject: [PATCH] Revert "Farabi/bot-785/fix performance panel not closing (#10453)" This reverts commit 5ee8d7770c7be1016a0a0dfb22556c856bf83173. --- .../bot-builder-tour/bot-builder-tour-desktop.tsx | 1 - .../bot-web-ui/src/components/run-panel/run-panel.scss | 3 +++ packages/bot-web-ui/src/components/run-panel/run-panel.tsx | 7 +++++-- packages/bot-web-ui/src/components/summary/summary.tsx | 6 ++---- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/packages/bot-web-ui/src/components/dashboard/dbot-tours/bot-builder-tour/bot-builder-tour-desktop.tsx b/packages/bot-web-ui/src/components/dashboard/dbot-tours/bot-builder-tour/bot-builder-tour-desktop.tsx index 466b0634190f..9d0044dc21c7 100644 --- a/packages/bot-web-ui/src/components/dashboard/dbot-tours/bot-builder-tour/bot-builder-tour-desktop.tsx +++ b/packages/bot-web-ui/src/components/dashboard/dbot-tours/bot-builder-tour/bot-builder-tour-desktop.tsx @@ -21,7 +21,6 @@ const BotBuilderTourDesktop = observer(() => { React.useEffect(() => { if (is_finished) { setTourDialogVisibility(true); - setActiveTour(''); } else if (is_close_tour) { setActiveTour(''); setIsCloseTour(false); diff --git a/packages/bot-web-ui/src/components/run-panel/run-panel.scss b/packages/bot-web-ui/src/components/run-panel/run-panel.scss index 1a685e4f918e..16a6dc6b2dea 100644 --- a/packages/bot-web-ui/src/components/run-panel/run-panel.scss +++ b/packages/bot-web-ui/src/components/run-panel/run-panel.scss @@ -52,6 +52,9 @@ margin: 0; position: fixed; } + &--tour-active { + display: none; + } &--info { display: flex; justify-content: center; diff --git a/packages/bot-web-ui/src/components/run-panel/run-panel.tsx b/packages/bot-web-ui/src/components/run-panel/run-panel.tsx index 4a478194cf2a..d49bb69d5efc 100644 --- a/packages/bot-web-ui/src/components/run-panel/run-panel.tsx +++ b/packages/bot-web-ui/src/components/run-panel/run-panel.tsx @@ -27,6 +27,7 @@ type TStatisticsSummary = { number_of_runs: number; total_stake: number; total_payout: number; + active_tour: string; toggleStatisticsInfoModal: () => void; total_profit: number; won_contracts: number; @@ -70,12 +71,14 @@ export const StatisticsSummary = ({ number_of_runs, total_stake, total_payout, + active_tour, toggleStatisticsInfoModal, total_profit, won_contracts, }: TStatisticsSummary) => (
@@ -138,7 +141,7 @@ const DrawerContent = ({ active_index, is_drawer_open, active_tour, setActiveTab
- {(is_drawer_open || active_tour) && } + {is_drawer_open && active_index !== 2 && } ); }; @@ -301,7 +304,7 @@ const RunPanel = observer(() => { anchor='right' className={classNames('run-panel', { 'run-panel__container': !is_mobile, - 'run-panel__container--tour-active': !is_mobile && active_tour, + 'run-panel__container--tour-active': !is_mobile, })} contentClassName='run-panel__content' header={header} diff --git a/packages/bot-web-ui/src/components/summary/summary.tsx b/packages/bot-web-ui/src/components/summary/summary.tsx index a950ff73abff..077305a7a04a 100644 --- a/packages/bot-web-ui/src/components/summary/summary.tsx +++ b/packages/bot-web-ui/src/components/summary/summary.tsx @@ -11,17 +11,15 @@ type TSummary = { }; const Summary = observer(({ is_drawer_open }: TSummary) => { - const { dashboard, summary_card } = useDBotStore(); + const { summary_card } = useDBotStore(); const { is_contract_loading, contract_info } = summary_card; - const { active_tour } = dashboard; - const is_mobile = isMobile(); return (