We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6940791 commit cf1a50cCopy full SHA for cf1a50c
src/components/VisualTour/VisualTour.tsx
@@ -70,10 +70,6 @@ export const VisualTour = ({
70
usableStepTarget = false,
71
isOpen = false,
72
}: VisualTourProps) => {
73
- if (isOpen === false) {
74
- return null;
75
- }
76
-
77
const [currentStepIndex, setCurrentStepIndex] = React.useState<number>(0);
78
const [currentStepComponent, setCurrentStepComponent] = React.useState<React.JSX.Element | null>(null);
79
@@ -234,7 +230,11 @@ export const VisualTour = ({
234
230
};
235
231
}, [currentStepIndex, usableStepTarget]);
236
232
237
- return currentStepComponent;
233
+ if (isOpen === false) {
+ return null;
+ } else {
+ return currentStepComponent;
+ }
238
239
240
interface StepModalProps {
0 commit comments