From db2688f3a70c53cb89b029d93419111c2fe289ff Mon Sep 17 00:00:00 2001 From: Zamitto <167933696+zamitto@users.noreply.github.com> Date: Sat, 28 Dec 2024 11:28:43 -0300 Subject: [PATCH] feat: rename variable --- .../pages/profile/profile-content/profile-content.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/renderer/src/pages/profile/profile-content/profile-content.tsx b/src/renderer/src/pages/profile/profile-content/profile-content.tsx index a8f65f0f..951eb41b 100644 --- a/src/renderer/src/pages/profile/profile-content/profile-content.tsx +++ b/src/renderer/src/pages/profile/profile-content/profile-content.tsx @@ -15,7 +15,7 @@ import { RecentGamesBox } from "./recent-games-box"; import { UserStatsBox } from "./user-stats-box"; import { UserLibraryGameCard } from "./user-library-game-card"; -const GAME_STAT_ANIMATION_DURATION_IN_MS = 3500; +const GAME_STATS_ANIMATION_DURATION_IN_MS = 3500; export function ProfileContent() { const { userProfile, isMe, userStats } = useContext(userProfileContext); @@ -48,13 +48,13 @@ export function ProfileContent() { if (!isAnimationRunning) return; statsAnimation.current = requestAnimationFrame( - function animateClosing(time) { - if (time - zero <= GAME_STAT_ANIMATION_DURATION_IN_MS) { - statsAnimation.current = requestAnimationFrame(animateClosing); + function animateGameStats(time) { + if (time - zero <= GAME_STATS_ANIMATION_DURATION_IN_MS) { + statsAnimation.current = requestAnimationFrame(animateGameStats); } else { setStatsIndex((index) => index + 1); zero = performance.now(); - statsAnimation.current = requestAnimationFrame(animateClosing); + statsAnimation.current = requestAnimationFrame(animateGameStats); } } );