From 26b4afeada27f2a02bd95bbaf67fdd6662b233a8 Mon Sep 17 00:00:00 2001 From: Luke Vella Date: Fri, 28 Mar 2025 10:43:44 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Round=20user=20count=20to=20the?= =?UTF-8?q?=20nearest=2010k?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/landing/src/components/home/bonus.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/landing/src/components/home/bonus.tsx b/apps/landing/src/components/home/bonus.tsx index 1e7712ccc..d9127c75e 100644 --- a/apps/landing/src/components/home/bonus.tsx +++ b/apps/landing/src/components/home/bonus.tsx @@ -12,6 +12,8 @@ import { BonusItem } from "@/components/home/bonus-item"; export async function Bonus({ t }: { t: TFunction<"home" | "common"> }) { const userCount = await prisma.user.count(); + const roundedUserCount = + userCount > 100000 ? Math.floor(userCount / 10000) * 10000 : userCount; return (
}) { i18nKey="statsUsersRegistered" ns="home" defaults="{count, number, ::compact-short} registered users" - values={{ count: userCount }} + values={{ count: roundedUserCount }} />