Skip to content

Fix Recharts Tooltip labelFormatter TypeScript typing in ContactCard#61

Open
larsrojo wants to merge 1 commit intogommzystudio:masterfrom
larsrojo:patch-1
Open

Fix Recharts Tooltip labelFormatter TypeScript typing in ContactCard#61
larsrojo wants to merge 1 commit intogommzystudio:masterfrom
larsrojo:patch-1

Conversation

@larsrojo
Copy link
Copy Markdown

This PR fixes a TypeScript compile error in ContactCard.tsx caused by an incorrect labelFormatter signature passed to Recharts Tooltip. Recharts types the label argument as ReactNode/any (not strictly number), so the callback now accepts label and safely coerces it to a timestamp when possible. If the value can’t be parsed as a valid number, it falls back to a string to avoid runtime issues while keeping the same time formatting behavior.

fazelukario added a commit to fazelukario/device-activity-tracker that referenced this pull request Feb 3, 2026
@zinmahdi63-ops8
Copy link
Copy Markdown

cteate a WhatsApp tracking website

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants