Skip to content
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,16 @@ const CopilotOpportunityDetails: FC<{}> = () => {
<span className={styles.infoValue}>{opportunity?.tzRestrictions}</span>
</div>
</div>
<div className={styles.infoColumn}>
<IconOutline.CashIcon className={styles.icon} />
<div className={styles.infoText}>
<span className={styles.infoHeading}>Payment</span>
<span className={styles.infoValue}>
{opportunity?.paymentType === 'standard'
? opportunity.paymentType : opportunity?.otherPaymentType}
</span>
</div>
</div>
</div>
{
initialized && (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,13 @@ const tableColumns: TableColumn<CopilotOpportunity>[] = [
{
label: 'Payment',
propertyName: 'paymentType',
type: 'text',
renderer: (copilotOpportunity: CopilotOpportunity) => (
<div>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider using a more descriptive variable name for copilotOpportunity in the renderer function to improve readability, especially if the function grows in complexity.

{copilotOpportunity.paymentType === 'standard'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The conditional logic could be simplified using a ternary operator directly in the JSX expression. Consider using: {copilotOpportunity.paymentType === 'standard' ? copilotOpportunity.paymentType : copilotOpportunity.otherPaymentType}.

? copilotOpportunity.paymentType : copilotOpportunity.otherPaymentType}
</div>
),
type: 'element',
},
]

Expand Down