Skip to content

Commit 280cc23

Browse files
CopilotAdez017
andcommitted
Fix SlotCounter display issue in footer stats - improve digit control
Co-authored-by: Adez017 <[email protected]>
1 parent 84d8858 commit 280cc23

File tree

1 file changed

+24
-12
lines changed

1 file changed

+24
-12
lines changed

src/theme/Footer/Layout/index.tsx

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,10 @@ export default function FooterLayout({
118118
<div className="stat-number">
119119
<SlotCounter
120120
value={parseStatValue(stats.activeUsers).numericValue}
121-
autoAnimationStart={true}
122-
duration={1.2}
121+
animateOnVisible={true}
122+
duration={1200}
123+
delay={100}
124+
sequentialAnimationMode={true}
123125
/>
124126
{parseStatValue(stats.activeUsers).suffix}
125127
</div>
@@ -137,8 +139,10 @@ export default function FooterLayout({
137139
<div className="stat-number">
138140
<SlotCounter
139141
value={parseStatValue(stats.tutorials).numericValue}
140-
autoAnimationStart={true}
141-
duration={1.2}
142+
animateOnVisible={true}
143+
duration={1200}
144+
delay={200}
145+
sequentialAnimationMode={true}
142146
/>
143147
{parseStatValue(stats.tutorials).suffix}
144148
</div>
@@ -156,8 +160,10 @@ export default function FooterLayout({
156160
<div className="stat-number">
157161
<SlotCounter
158162
value={parseStatValue(stats.successRate).numericValue}
159-
autoAnimationStart={true}
160-
duration={1.2}
163+
animateOnVisible={true}
164+
duration={1200}
165+
delay={300}
166+
sequentialAnimationMode={true}
161167
/>
162168
{parseStatValue(stats.successRate).suffix}
163169
</div>
@@ -177,22 +183,28 @@ export default function FooterLayout({
177183
<>
178184
<SlotCounter
179185
value={24}
180-
autoAnimationStart={true}
181-
duration={1.2}
186+
animateOnVisible={true}
187+
duration={1200}
188+
delay={400}
189+
sequentialAnimationMode={true}
182190
/>
183191
/
184192
<SlotCounter
185193
value={7}
186-
autoAnimationStart={true}
187-
duration={1.2}
194+
animateOnVisible={true}
195+
duration={1200}
196+
delay={500}
197+
sequentialAnimationMode={true}
188198
/>
189199
</>
190200
) : (
191201
<>
192202
<SlotCounter
193203
value={parseStatValue(stats.supportHours).numericValue}
194-
autoAnimationStart={true}
195-
duration={1.2}
204+
animateOnVisible={true}
205+
duration={1200}
206+
delay={400}
207+
sequentialAnimationMode={true}
196208
/>
197209
{parseStatValue(stats.supportHours).suffix}
198210
</>

0 commit comments

Comments
 (0)