We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c6e632b commit 3500423Copy full SHA for 3500423
src/components/GitHubInstallButtons/index.tsx
@@ -6,6 +6,10 @@ import styles from './styles.module.css';
6
7
// Number formatting function
8
function formatNumber(num: number): string {
9
+ if (num >= 1000000) {
10
+ const truncated = Math.floor((num / 1000000) * 10) / 10;
11
+ return truncated.toFixed(1) + "M";
12
+ }
13
const truncated = Math.floor((num / 1000) * 10) / 10;
14
return truncated.toFixed(1) + "k";
15
}
0 commit comments