From e9b32e6688195a515c3aa9dd8c5e7bdddcf1f175 Mon Sep 17 00:00:00 2001 From: Tanmay Date: Mon, 11 May 2020 01:03:55 +0530 Subject: [PATCH] fixed zoom out on defocus in mobile device --- src/App.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 584f6a6..ec14fff 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -108,9 +108,9 @@ function Counter() { }, []); useEffect(() => { if (counter != total) { - if (total - counter == 10000) setCounter(counter + 1); - else if (counter < 10000) setCounter(counter + 100); - else if (counter < 100000) setCounter(counter + 50); + if (total - counter <= 1000) setCounter(counter + 1); + else if (counter < 10000) setCounter(counter + 1000); + else setCounter(counter + 500); } }, [counter]);