Used Millify for main page counters#1083
Conversation
Summary by CodeRabbit
WalkthroughThis pull request updates the AnimatedCounter component to improve number formatting. The changes include importing the Changes
Suggested labels
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
frontend/src/components/AnimatedCounter.tsx (1)
34-34: Implementation looks good!The application of
millify(count)properly formats the count for better readability. This successfully converts large numbers like 11100 to "11.1k" for improved user experience.Consider if you need any customization options that millify provides, such as:
precision- to control decimal placeslowercase- for "k" instead of "K"space- to add space between number and suffixExample with options:
millify(count, { precision: 1, lowercase: true })
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
frontend/package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (1)
frontend/src/components/AnimatedCounter.tsx(2 hunks)
🔇 Additional comments (1)
frontend/src/components/AnimatedCounter.tsx (1)
2-2: Good addition of millify libraryThe
millifylibrary is a good choice for formatting large numbers into human-readable format. This aligns well with the PR objective to improve counter display.
|
arkid15r
left a comment
There was a problem hiding this comment.
LGTM 👍
Thanks for updating this
* Used Millify for main page counters * Update code --------- Co-authored-by: Arkadii Yakovets <arkadii.yakovets@owasp.org>



Resolves #1025
Used Millify to Make counters to be shortened, e.g. 11K+ for 11100+