Skip to content
Snippets Groups Projects
Commit 9481027c authored by Katarína Sieklová's avatar Katarína Sieklová
Browse files

feat: en intro

parent 4c219363
No related branches found
No related tags found
No related merge requests found
Pipeline #
File deleted
File deleted
File added
File added
File added
File added
File added
File added
File added
File added
File added
File added
......@@ -14,10 +14,13 @@ const Intro = () => {
const typewriterRef = useRef<TypewriterClass>();
const navigate = useNavigate();
const skipButtonText = useTranslate(skipToChapter) + "1";
const audioFiles = [
'public/sounds/en_intro_1.mp3',
'public/sounds/en_intro_2.mp3',
];
const audioFiles: string[] = [];
for (let i = 1; i <= 10; i++) {
const filePath = `public/sounds/intro/en_intro_${i}.mp3`;
audioFiles.push(filePath);
}
const {getAnimationObject, handleClick, isAnimationComplete, isLast, onInit, paused, handleMuteToggle, isMuted} = useAnimate({
typewriterRef,
......@@ -61,12 +64,14 @@ const Intro = () => {
>
{isLast ? chapter1Text : nextButtonText}
</button>
{!isLast && (
<button
onClick={() => navigate("/insulin")}
className={`mt-20 border-4 border-black font-primary bg-yellow-main`}
>
{skipButtonText}
</button>
)}
<button onClick={handleMuteToggle}
className={`mt-20 border-4 border-black font-primary bg-yellow-main`}
>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment