Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "plotlink",
"version": "1.7.0",
"version": "1.7.1",
"private": true,
"workspaces": [
"packages/*"
Expand Down
14 changes: 10 additions & 4 deletions src/components/airdrop/CampaignHero.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,15 @@ function makeMcapToX(milestones: StatusData["milestones"]) {
}

function formatMcap(n: number): string {
if (n >= 1_000_000) return `$${n / 1_000_000}M`;
if (n >= 1_000) return `$${n / 1_000}K`;
return `$${n}`;
if (n >= 1_000_000) {
const m = n / 1_000_000;
return Number.isInteger(m) ? `$${m}M` : `$${m.toFixed(2)}M`;
}
if (n >= 1_000) {
const k = n / 1_000;
return Number.isInteger(k) ? `$${k}K` : `$${k.toFixed(2)}K`;
}
return `$${n.toFixed(0)}`;
}

const TIER_NAMES: Record<string, string> = {
Expand Down Expand Up @@ -138,7 +144,7 @@ function MCapChart({
// SVG geometry — short horizontal band, room for top labels on desktop
const svgW = 600;
const svgH = 110;
const pad = { top: 50, right: 16, bottom: 14, left: 16 };
const pad = { top: 50, right: 50, bottom: 14, left: 24 };
const chartW = svgW - pad.left - pad.right;
const barY = pad.top + (svgH - pad.top - pad.bottom) / 2;

Expand Down
Loading