Fix hero242 ChartTooltip labelFormatter Date typing.

String-coerce the ReactNode label so production TypeScript builds accept new Date().

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
mr.sabri
2026-07-21 20:46:54 +03:30
co-authored by Cursor
parent 8434601ae5
commit 18f84bfd41
+5 -2
View File
@@ -157,11 +157,14 @@ const Hero242 = ({ className }: Hero242Props) => {
className="w-[150px]" className="w-[150px]"
nameKey="views" nameKey="views"
labelFormatter={(value) => { labelFormatter={(value) => {
return new Date(value).toLocaleDateString("en-US", { return new Date(String(value)).toLocaleDateString(
"en-US",
{
month: "short", month: "short",
day: "numeric", day: "numeric",
year: "numeric", year: "numeric",
}); }
);
}} }}
/> />
} }