Skip to content

fix: show final stat values immediately when prefers-reduced-motion i… - #497

Open
martinshub-tech wants to merge 1 commit into
TevaLabs:mainfrom
martinshub-tech:feature/reduced-motion-stats
Open

fix: show final stat values immediately when prefers-reduced-motion i…#497
martinshub-tech wants to merge 1 commit into
TevaLabs:mainfrom
martinshub-tech:feature/reduced-motion-stats

Conversation

@martinshub-tech

Copy link
Copy Markdown

Closes #430

Here is a summary of what was done:

src/pages/Landing.tsx: Updated the useCountUp hook to check window.matchMedia('(prefers-reduced-motion: reduce)'). When true, the hook immediately sets and returns the final target value instead of starting at 0, bypassing the animation loop completely.
src/pages/Landing.test.tsx: Added a new test suite that mocks matchMedia to return true for prefers-reduced-motion. The test verifies that the final stat strings (e.g. 1,247, 4.2M) are immediately present in the DOM on initial render.
Tests: Ran all tests to ensure they are passing.

@vercel

vercel Bot commented Aug 26, 2026

Copy link
Copy Markdown

@martinshub-tech is attempting to deploy a commit to the josephchimebuka's projects Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add reduced-motion path for Landing count-up stats

1 participant