Skip to content

Commit

Permalink
Merge pull request #1584 from ecency/bugfix/editor-tour
Browse files Browse the repository at this point in the history
Editor tour: fixed enablement
  • Loading branch information
feruzm authored Mar 29, 2024
2 parents eddc935 + d12692a commit 7ca8e39
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions src/common/features/ui/intro-tour/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
Expand Down Expand Up @@ -110,16 +110,17 @@ export function IntroTour({ steps, id, enabled, forceActivation, setForceActivat

return isMounted() && !isFinished ? (
<>
{createPortal(
<div
className={classNameObject({
"bg-black opacity-[50%] z-[1040] fixed top-0 left-0 right-0 bottom-0": true
})}
style={{ clipPath }}
onClick={() => finish()}
/>,
document.querySelector("#modal-overlay-container")!!
)}
{step &&
createPortal(
<div
className={classNameObject({
"bg-black opacity-[50%] z-[1040] fixed top-0 left-0 right-0 bottom-0": true
})}
style={{ clipPath }}
onClick={() => finish()}
/>,
document.querySelector("#modal-overlay-container")!!
)}
{step &&
createPortal(
<div
Expand Down

0 comments on commit 7ca8e39

Please sign in to comment.