From de8edf96849b8026f5bc635dc424623e9f8323ff Mon Sep 17 00:00:00 2001 From: Joshua <62268199+minimalsm@users.noreply.github.com> Date: Mon, 21 Jul 2025 14:15:51 +0100 Subject: [PATCH] Improve torch card ui copy --- .../_components/TorchHistorySwiper/index.tsx | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/app/[locale]/10years/_components/TorchHistorySwiper/index.tsx b/app/[locale]/10years/_components/TorchHistorySwiper/index.tsx index c6c54671e05..a82dccf9bd0 100644 --- a/app/[locale]/10years/_components/TorchHistorySwiper/index.tsx +++ b/app/[locale]/10years/_components/TorchHistorySwiper/index.tsx @@ -19,6 +19,22 @@ type TorchHistorySwiperProps = { currentHolderAddress: Address | null } +const getOrdinalSuffix = (num: number): string => { + const pr = new Intl.PluralRules("en", { type: "ordinal" }) + const rule = pr.select(num) + + switch (rule) { + case "one": + return `${num}st` + case "two": + return `${num}nd` + case "few": + return `${num}rd` + default: + return `${num}th` + } +} + const TorchHistorySwiper = ({ holders, currentHolderAddress, @@ -40,8 +56,8 @@ const TorchHistorySwiper = ({ // Create placeholder for future holder return { address: `placeholder-${index}` as Address, - name: `Future Bearer ${index + 1}`, - role: "Coming soon...", + name: `Torchbearer ${index + 1}`, + role: `Coming July ${getOrdinalSuffix(20 + index)}!`, twitter: "", event: { from: "0x0000000000000000000000000000000000000000" as Address,