From d7d444755dc84745ba7a20d4b8b90d423c82292c Mon Sep 17 00:00:00 2001 From: otariidae Date: Fri, 18 Nov 2022 09:04:41 +0900 Subject: [PATCH] stop too frequent re-rendering --- frontend/site/pages/index.tsx | 8 -------- 1 file changed, 8 deletions(-) diff --git a/frontend/site/pages/index.tsx b/frontend/site/pages/index.tsx index d126aefa..1f37d963 100644 --- a/frontend/site/pages/index.tsx +++ b/frontend/site/pages/index.tsx @@ -147,14 +147,6 @@ const Home: NextPage = () => { } }, []) - useEffect(() => { - const intervalId = setInterval(() => { - const tmpTrainPosition1 = trainPosition1 + 0.01 - setTrainPosition1(tmpTrainPosition1 <= 1 ? tmpTrainPosition1 : 0) - }, 20) - return () => clearInterval(intervalId) - }) - return (