From 2ec66ee195a3de926dfff71822ed9ff5a6302fc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Zaninotto?= Date: Tue, 20 Aug 2024 18:38:48 +0200 Subject: [PATCH] Fix contact import --- examples/crm/src/contacts/useContactImport.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/examples/crm/src/contacts/useContactImport.tsx b/examples/crm/src/contacts/useContactImport.tsx index 209a0d2b44a..5d1d7006a35 100644 --- a/examples/crm/src/contacts/useContactImport.tsx +++ b/examples/crm/src/contacts/useContactImport.tsx @@ -175,8 +175,12 @@ export function useContactImport() { phone_2_number, phone_2_type, background, - first_seen: new Date(first_seen), - last_seen: new Date(last_seen), + first_seen: first_seen + ? new Date(first_seen).toISOString() + : undefined, + last_seen: last_seen + ? new Date(last_seen).toISOString() + : undefined, has_newsletter, status, company_id: company.id,