Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cosmetic UI: display figures to always contain 2 decimal places for consistency #3607

Closed
marsrobertson opened this issue Aug 20, 2024 · 3 comments · Fixed by #3715
Closed
Assignees
Labels
bug Something isn't working Scouts Game - Common

Comments

@marsrobertson
Copy link

It immediately got my attention as misaligned. Or maybe by design? I think consistency is better.

image
@linear linear bot added the bug Something isn't working label Sep 3, 2024
@onyedikachi-david
Copy link

Can i get assigned?

@eben619
Copy link
Contributor

eben619 commented Oct 26, 2024

Hey @marsrobertson, @MasterHW , I have a fix for this. To fix the display figures issue you could update the props.crowdfundedUSD component in the ViewRoundPage.tsx. file found in grants-stack\packages\grant-explorer\src\features\round\ViewRoundPage.tsx.

fix :

{props.crowdfundedUSD?.toLocaleString("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 2, })}
This approach will guarantee the amount is always shown in two decimal places on the frontend. Even if it is a whole number.

I'll go ahead and create a draft pull request for this fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Scouts Game - Common
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants