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
+8 -5
View File
@@ -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",
}
);
}}
/>
}