"use client" import type React from "react" import { useEffect, useState } from "react" import { useHistory } from "react-router-dom" import confetti from "../assets/Confetti.gif" import { getRouteCourses } from "../shared/consts/router" import { getRouteHome } from "../shared/consts/router" const CourseComplete: React.FC = () => { const history = useHistory() const [animationPhase, setAnimationPhase] = useState(0) useEffect(() => { const timer1 = setTimeout(() => setAnimationPhase(1), 500) const timer2 = setTimeout(() => setAnimationPhase(2), 1000) const timer3 = setTimeout(() => setAnimationPhase(3), 1500) return () => { clearTimeout(timer1) clearTimeout(timer2) clearTimeout(timer3) } }, []) return (
{/* Basket Animation */}
Описание GIF
= 2 ? "scale-80" : "scale-100"} ${animationPhase >= 3 ? "-translate-y-10 scale-0" : "opacity-100 translate-y-0 scale-80"}`} >
{/* Main Content */}
{/* Ball */}
= 1 ? "opacity-100 -translate-y-1/2 scale-15 translate-x-5" : "opacity-0 translate-y-60 scale-80 -translate-x-60" } ${animationPhase >= 2 ? "opacity-100 translate-y-400 scale-15" : "opacity-100 -translate-y-100 scale-15"} ` } >
{/* Congratulations */}
= 3 ? "opacity-100 translate-y-0" : "opacity-0 -translate-y-4" }`} >

Поздравляем!

Вы успешно завершили курс

{/* Action Buttons */}
= 3 ? "opacity-100 translate-y-0" : "opacity-0 translate-y-4" }`} >
) } export default CourseComplete