-
Notifications
You must be signed in to change notification settings - Fork 1.6k
chore: display prices as full number on sales page #11554
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would suggest creating a new helper function outside the component and making use of it.
const helper = (num: BN) => `${(num.toNumber() / 10 ** formatBalance.getDefaults().decimals)} ${formatBalance.getDefaults().unit}`;
and use it like:
const formattedCoretimePrice = useMemo(() => {
return !coretimePrice ? null : helper(coretimePrice);
}, [coretimePrice])
Similarly, use it with startPrice
and endPrice
as well. This makes the code cleaner and more readable.
That makes sense. I'll make the requested changes. |
@ap211unitech I’ve made the suggested change in 404698b. Also, the Sale Timeline box looked cluttered when the price value was large on smaller screens, so I updated the layout to a 2×3 grid to improve readability. |
404698b
to
ad590ab
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice 🚀
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
fixes #11465
Previous behaviour
Current behaviour (updated)