From 66d83123cdcc3ae0a33b9328800d55ea39e7aba9 Mon Sep 17 00:00:00 2001 From: SkateSpots Date: Mon, 5 Oct 2026 18:57:53 +0700 Subject: [PATCH] feat(supporters): Dec-2025 cutoff + collapse list to top 10 (show all) --- src/i18n/en.ts | 2 ++ src/i18n/es.ts | 2 ++ src/pages/SupportersPage.tsx | 26 +++++++++++++++++++++++--- 3 files changed, 27 insertions(+), 3 deletions(-) diff --git a/src/i18n/en.ts b/src/i18n/en.ts index 89e6752..517ff00 100644 --- a/src/i18n/en.ts +++ b/src/i18n/en.ts @@ -6502,6 +6502,8 @@ walletUi: { quietNote: 'Plus everyone who gave quietly — thank you. ❤️', tiersNote: 'Tiers: Supporter under 100k sats · Patron 100k–1M · Legend 1M+', joinSupporters: 'Join {{count}} supporters', + showAll: 'Show all {{count}}', + showLess: 'Show less', impactSeeStats: 'See the full picture →', impactAsOf: 'live from the community relays', anonymousBacker: 'Anonymous supporter', diff --git a/src/i18n/es.ts b/src/i18n/es.ts index 0cca777..d190ea2 100644 --- a/src/i18n/es.ts +++ b/src/i18n/es.ts @@ -6502,6 +6502,8 @@ walletUi: { quietNote: 'Y a todos los que aportaron en silencio — gracias. ❤️', tiersNote: 'Niveles: Colaborador menos de 100k sats · Patrón 100k–1M · Leyenda 1M+', joinSupporters: 'Únete a {{count}} patrocinadores', + showAll: 'Ver los {{count}}', + showLess: 'Ver menos', impactSeeStats: 'Ver el panorama completo →', impactAsOf: 'en vivo desde los relés de la comunidad', anonymousBacker: 'Patrocinador anónimo', diff --git a/src/pages/SupportersPage.tsx b/src/pages/SupportersPage.tsx index 1394a1b..5cbfd5f 100644 --- a/src/pages/SupportersPage.tsx +++ b/src/pages/SupportersPage.tsx @@ -1,4 +1,4 @@ -import { useMemo } from 'react'; +import { useMemo, useState } from 'react'; import { useSeoMeta } from '@unhead/react'; import { Link } from 'react-router-dom'; import { nip19 } from 'nostr-tools'; @@ -15,6 +15,13 @@ import { useTranslation } from '@/contexts/language'; const ANGOR_PROJECT_URL = 'https://angor.io/project/angor1qtunna00uqyx52rr0nvqa059z2gknhrmn7urd6z'; +// Only count support received from this point (the project's public launch era). +// Zaps to the platform before this are ignored. NOTE: as of 2026-10-05 every +// platform zap is already ≥ 2026-01, so this doesn't currently trim the list — +// the visible cap below is what keeps it short. +const SUPPORTERS_SINCE = Math.floor(Date.UTC(2025, 11, 1) / 1000); // 2025-12-01 +const VISIBLE_LIMIT = 10; + // ─── Static data — edit these arrays to add/remove entries ────────────────── interface Collaborator { @@ -343,12 +350,13 @@ function PlaceholderCard({ label }: { label: string }) { export default function SupportersPage() { const { t } = useTranslation(); - const { data: zaps } = useZapLeaderboard(undefined, PLATFORM_OWNER_PUBKEYS); + const { data: zaps } = useZapLeaderboard(SUPPORTERS_SINCE, PLATFORM_OWNER_PUBKEYS); const zappers = useMemo(() => zaps?.senders ?? [], [zaps]); const zapTotal = zappers.reduce((sum, z) => sum + z.sats, 0); const allSats = BACKERS_TOTAL_SATS + zapTotal; const totalUsd = useSatsToUsd(allSats); const { data: stats } = useGrowthStats(); + const [showAll, setShowAll] = useState(false); // One ranked wall: Angor backers + Lightning zaps to the project, merged by npub. const supporters = useMemo(() => { @@ -551,10 +559,22 @@ export default function SupportersPage() { {supporters.length > 0 ? ( <>
- {supporters.map((entry, i) => ( + {(showAll ? supporters : supporters.slice(0, VISIBLE_LIMIT)).map((entry, i) => ( ))}
+ {supporters.length > VISIBLE_LIMIT && ( +
+ +
+ )}

{t('walletUi.supporters.supportersTotals', {