From 4b18d31fc144b404b3a00905806cab0dc4a62b0f Mon Sep 17 00:00:00 2001 From: larsrojo Date: Wed, 21 Jan 2026 19:48:47 -0600 Subject: [PATCH] Enhance Tooltip labelFormatter for better handling --- client/src/components/ContactCard.tsx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/client/src/components/ContactCard.tsx b/client/src/components/ContactCard.tsx index f03ec98..4f42254 100644 --- a/client/src/components/ContactCard.tsx +++ b/client/src/components/ContactCard.tsx @@ -186,8 +186,16 @@ export function ContactCard({ new Date(t).toLocaleTimeString()} - contentStyle={{ borderRadius: '8px', border: 'none', boxShadow: '0 4px 6px -1px rgb(0 0 0 / 0.1)' }} + labelFormatter={(label) => { + const t = typeof label === "number" ? label : Number(label); + if (!Number.isFinite(t)) return String(label ?? ""); + return new Date(t).toLocaleTimeString(); + }} + contentStyle={{ + borderRadius: "8px", + border: "none", + boxShadow: "0 4px 6px -1px rgb(0 0 0 / 0.1)", + }} />