Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions src/record/widgets/company-customer-request-count-widget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,13 @@ const LoadingWidget = ({recordId}: {recordId: string}) => {
<Widget.Text.Primary>Customer requests disabled</Widget.Text.Primary>
<Widget.Text.Secondary>Click to go to Linear settings</Widget.Text.Secondary>
</>
) : customerNeeds !== null ? (
) : (
<>
<Widget.Text.Primary>{name}</Widget.Text.Primary>
<Widget.Text.Secondary>
{customerNeeds} customer request{customerNeeds === 1 ? "" : "s"}
</Widget.Text.Secondary>
</>
) : (
<Widget.Text.Primary>{name}</Widget.Text.Primary>
)}
</Widget.TextWidget>
)
Expand Down Expand Up @@ -79,7 +77,7 @@ async function load(recordId: string) {
])
const domain = companyResult?.company?.domains?.[0]
const name = companyResult?.company?.name ?? domain ?? "Unnamed Company"
const customerNeeds = customer ? await getCustomerNeedsCount(customer.id) : null
const customerNeeds = customer ? await getCustomerNeedsCount(customer.id) : 0
return {
name,
customerNeeds,
Expand Down