From 15d876cf861245c6c40753cab7f44cd2b2f2a0c0 Mon Sep 17 00:00:00 2001 From: "ildar.timerbaev" Date: Sat, 30 Mar 2024 00:46:54 +0600 Subject: [PATCH 1/2] Editor tour: fixed enablement --- src/common/features/ui/intro-tour/index.tsx | 23 +++++++++++---------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/src/common/features/ui/intro-tour/index.tsx b/src/common/features/ui/intro-tour/index.tsx index 01487b0638c..2f32039bf79 100644 --- a/src/common/features/ui/intro-tour/index.tsx +++ b/src/common/features/ui/intro-tour/index.tsx @@ -60,7 +60,7 @@ export function IntroTour({ steps, id, enabled, forceActivation, setForceActivat // Detect enablement and set default step if there aren't any persistent step useEffect(() => { - if (typeof currentStep === "undefined" && !isFinished && enabled) { + if (currentStep == undefined && !isFinished && enabled) { setCurrentStep(0); } }, [currentStep, enabled, isFinished]); @@ -110,16 +110,17 @@ export function IntroTour({ steps, id, enabled, forceActivation, setForceActivat return isMounted() && !isFinished ? ( <> - {createPortal( -
finish()} - />, - document.querySelector("#modal-overlay-container")!! - )} + {enabled && + createPortal( +
finish()} + />, + document.querySelector("#modal-overlay-container")!! + )} {step && createPortal(
Date: Sat, 30 Mar 2024 00:47:37 +0600 Subject: [PATCH 2/2] Editor tour: fixed enablement --- src/common/features/ui/intro-tour/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/features/ui/intro-tour/index.tsx b/src/common/features/ui/intro-tour/index.tsx index 2f32039bf79..ee323f28d20 100644 --- a/src/common/features/ui/intro-tour/index.tsx +++ b/src/common/features/ui/intro-tour/index.tsx @@ -110,7 +110,7 @@ export function IntroTour({ steps, id, enabled, forceActivation, setForceActivat return isMounted() && !isFinished ? ( <> - {enabled && + {step && createPortal(