disable animation on completed steps
This commit is contained in:
parent
42f2814e1c
commit
01b7e1ab67
1 changed files with 7 additions and 1 deletions
|
|
@ -32,6 +32,12 @@ export function OnboardingStep({
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isCompleted) {
|
||||||
|
setDisplayedText(text);
|
||||||
|
setShowChildren(true);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
let currentIndex = 0;
|
let currentIndex = 0;
|
||||||
setDisplayedText("");
|
setDisplayedText("");
|
||||||
setShowChildren(false);
|
setShowChildren(false);
|
||||||
|
|
@ -47,7 +53,7 @@ export function OnboardingStep({
|
||||||
}, 20); // 20ms per character
|
}, 20); // 20ms per character
|
||||||
|
|
||||||
return () => clearInterval(interval);
|
return () => clearInterval(interval);
|
||||||
}, [text, isVisible]);
|
}, [text, isVisible, isCompleted]);
|
||||||
|
|
||||||
if (!isVisible) return null;
|
if (!isVisible) return null;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue