From 18f84bfd41d1e70d6312f7b3fe8df3d804c6f0b9 Mon Sep 17 00:00:00 2001 From: "mr.sabri" Date: Tue, 21 Jul 2026 20:46:54 +0330 Subject: [PATCH] Fix hero242 ChartTooltip labelFormatter Date typing. String-coerce the ReactNode label so production TypeScript builds accept new Date(). Co-authored-by: Cursor --- blocks/hero242.tsx | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/blocks/hero242.tsx b/blocks/hero242.tsx index 2786c32..6e98a01 100644 --- a/blocks/hero242.tsx +++ b/blocks/hero242.tsx @@ -157,11 +157,14 @@ const Hero242 = ({ className }: Hero242Props) => { className="w-[150px]" nameKey="views" labelFormatter={(value) => { - return new Date(value).toLocaleDateString("en-US", { - month: "short", - day: "numeric", - year: "numeric", - }); + return new Date(String(value)).toLocaleDateString( + "en-US", + { + month: "short", + day: "numeric", + year: "numeric", + } + ); }} /> }