diff --git a/web/components/StartAnim.tsx b/web/components/StartAnim.tsx index cdfcba0..6265196 100644 --- a/web/components/StartAnim.tsx +++ b/web/components/StartAnim.tsx @@ -2,19 +2,26 @@ import { Player, PlayerEvent } from "@lottiefiles/react-lottie-player"; import LoadingAnimation from "../animations/loading_anim.json"; +import { useEffect } from "react"; type Props = { onComplete: () => void } -const StartAnim = ({ onComplete }: Props) =>
{ - if (e === PlayerEvent.Complete) { - onComplete() +const StartAnim = ({ onComplete }: Props) => { + + useEffect(() => { + const timeout = setTimeout(() => { onComplete() }, 15100) + return () => { + clearTimeout(timeout) } - }} -/>
+ }) + + return
+} export default StartAnim; \ No newline at end of file