Skip to content

Commit 3c9c376

Browse files
authored
fix: update star count rounding from up to down (#1042)
1 parent f55db20 commit 3c9c376

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

apps/app/src/app/shared/header/header.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ export class Header {
7878
protected readonly _stars = computed(() => {
7979
const count = this._githubInfo.value()?.stars ?? 0;
8080
if (count < 1000) return count.toString();
81-
// Divide by 1000, round up to the nearest tenth, and format as "k"
82-
const rounded = Math.ceil((count / 1000) * 10) / 10;
81+
// Divide by 1000, round down to the nearest tenth, and format as "k"
82+
const rounded = Math.floor((count / 1000) * 10) / 10;
8383
return `${rounded}k`;
8484
});
8585
}

0 commit comments

Comments
 (0)