From 5e7e60694bdadd1c8f95e396e03d22a0458db5cc Mon Sep 17 00:00:00 2001 From: ROTO0504 <88580483+ROTO0504@users.noreply.github.com> Date: Sat, 9 Nov 2024 22:31:17 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A7=20bun=20run=20test?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../{logoanimation.json => logo.json} | 0 src/components/LogoAnimation.tsx | 2 +- src/components/LottiePlayer.tsx | 4 ++-- src/routes/index.tsx | 23 +++++++++---------- 4 files changed, 14 insertions(+), 15 deletions(-) rename src/assets/animations/{logoanimation.json => logo.json} (100%) diff --git a/src/assets/animations/logoanimation.json b/src/assets/animations/logo.json similarity index 100% rename from src/assets/animations/logoanimation.json rename to src/assets/animations/logo.json diff --git a/src/components/LogoAnimation.tsx b/src/components/LogoAnimation.tsx index 38b9f63..3a51d2b 100644 --- a/src/components/LogoAnimation.tsx +++ b/src/components/LogoAnimation.tsx @@ -1,7 +1,7 @@ import { VStack } from "panda/jsx"; import { type ReactElement } from "react"; import LottiePlayer from "./LottiePlayer"; -import logoAnimation from "@/assets/animations/logoAnimation.json"; +import logoAnimation from "@/assets/animations/logo.json"; export function LogoAnimation(): ReactElement { return ( diff --git a/src/components/LottiePlayer.tsx b/src/components/LottiePlayer.tsx index 8e508b0..04549fc 100644 --- a/src/components/LottiePlayer.tsx +++ b/src/components/LottiePlayer.tsx @@ -23,7 +23,7 @@ export default function LottiePlayer({ const _stopAtEnd = stopAtEnd ?? false; useEffect(() => { - if (_stopAtEnd && lottieState) { + if (_stopAtEnd && lottieState != null) { const lastFrame = lottieState.totalFrames - 1; lottieState.addEventListener("complete", () => { @@ -44,11 +44,11 @@ export default function LottiePlayer({ return (