From f668805611f71f249a3cc38688e50ec43dbbd938 Mon Sep 17 00:00:00 2001 From: Alexander Zinchuk Date: Mon, 30 Jan 2023 15:55:56 +0100 Subject: [PATCH] Animated Counter: Adjust speed --- src/components/common/AnimatedCounter.module.scss | 2 +- src/components/common/AnimatedCounter.tsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/common/AnimatedCounter.module.scss b/src/components/common/AnimatedCounter.module.scss index 64104d27d..b3d836fc4 100644 --- a/src/components/common/AnimatedCounter.module.scss +++ b/src/components/common/AnimatedCounter.module.scss @@ -1,7 +1,7 @@ $perspective: 10px; $translate: 10px; $rotate: 30deg; -$animation-time: 0.15s; +$animation-time: 200ms; .root { display: inline-flex; diff --git a/src/components/common/AnimatedCounter.tsx b/src/components/common/AnimatedCounter.tsx index e4e287d68..e5b23d67d 100644 --- a/src/components/common/AnimatedCounter.tsx +++ b/src/components/common/AnimatedCounter.tsx @@ -14,7 +14,7 @@ type OwnProps = { text: string; }; -const ANIMATION_TIME = 150; +const ANIMATION_TIME = 200; const AnimatedCounter: FC = ({ text, @@ -54,7 +54,7 @@ const AnimatedCounter: FC = ({ useTimeout(() => { isAnimatingRef.current = false; forceUpdate(); - }, shouldAnimate && isAnimatingRef.current ? ANIMATION_TIME : undefined); + }, isAnimatingRef.current ? ANIMATION_TIME : undefined); return (