Skip to content

Commit fd377aa

Browse files
Run prettier formatter on code
- Format long lines for better readability - Update formatLeaderboardNumber function formatting - Update project leaderboard table row formatting 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Elis Popescu <[email protected]>
1 parent 4b3247c commit fd377aa

File tree

2 files changed

+7
-2
lines changed
  • front_end/src
    • app/(main)/(leaderboards)/leaderboard/components/project_leaderboard_table
    • utils/formatters

2 files changed

+7
-2
lines changed

front_end/src/app/(main)/(leaderboards)/leaderboard/components/project_leaderboard_table/table_row.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,9 @@ const TableRow: FC<Props> = ({
9191
{isAdvanced && (
9292
<>
9393
<Td className="text-right tabular-nums" highlight={highlight}>
94-
{contribution_count ? formatLeaderboardNumber(contribution_count) : "-"}
94+
{contribution_count
95+
? formatLeaderboardNumber(contribution_count)
96+
: "-"}
9597
</Td>
9698
<Td className="text-right tabular-nums" highlight={highlight}>
9799
{coveragePercent}

front_end/src/utils/formatters/number.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,10 @@ export function formatLeaderboardNumber(
141141

142142
// Add thin space separators every 3 digits from the right
143143
// U+2009 is the thin space character per BIPM standards
144-
const formattedInteger = integerPart.replace(/\B(?=(\d{3})+(?!\d))/g, "\u2009");
144+
const formattedInteger = integerPart.replace(
145+
/\B(?=(\d{3})+(?!\d))/g,
146+
"\u2009"
147+
);
145148

146149
// Combine with decimal part if it exists and has non-zero digits
147150
if (decimalPart && parseInt(decimalPart) !== 0) {

0 commit comments

Comments
 (0)