Skip to content

A full-featured CRM built with React, shadcn/ui, and Supabase.

Fix contact list when no position or company

François Zaninottoa68dcc602542
diff --git a/src/deals/ContactList.tsx b/src/deals/ContactList.tsx
index 513b2f2e..5bd56c3f 100644
--- a/src/deals/ContactList.tsx
+++ b/src/deals/ContactList.tsx
@@ -20,7 +20,9 @@ export const ContactList = () => {
{contact.first_name} {contact.last_name}
</Link>
<Typography variant="caption" color="text.secondary">
- {contact.title} at {contact.company_name}
+ {contact.title}
+ {contact.title && contact.company_name && ' at '}
+ {contact.company_name}
</Typography>
</Stack>
</Stack>
diff --git a/src/misc/ContactOption.tsx b/src/misc/ContactOption.tsx
index ea811b79..34c5ec53 100644
--- a/src/misc/ContactOption.tsx
+++ b/src/misc/ContactOption.tsx
@@ -12,7 +12,9 @@ const ContactOptionRender = () => {
<Stack>
{record.first_name} {record.last_name}
<Typography variant="caption" color="text.secondary">
- {record.title} at {record.company_name}
+ {record.title}
+ {record.title && record.company_name && ' at '}
+ {record.company_name}
</Typography>
</Stack>
</Stack>