Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
32 changes: 23 additions & 9 deletions src/apps/copilots/src/pages/copilot-opportunity-list/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,29 @@ const tableColumns: TableColumn<CopilotOpportunity>[] = [
isSortable: false,
label: 'Skills Required',
propertyName: 'skills',
renderer: (copilotOpportunity: CopilotOpportunity) => (
<div className={styles.skillsContainer}>
{copilotOpportunity.skills.map((skill: any) => (
<div key={skill.id} className={styles.skillPill}>
{skill.name}
</div>
))}
</div>
),
renderer: (copilotOpportunity: CopilotOpportunity) => {
const visibleSkills = copilotOpportunity.skills.slice(0, 3)
const remainingSkills = copilotOpportunity.skills.slice(3)
return (
<div className={styles.skillsContainer}>
{visibleSkills.map(skill => (
<div key={skill.id} className={styles.skillPill}>

Choose a reason for hiding this comment

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

Consider specifying the type for skill in the map function to improve type safety and readability.

{skill.name}
</div>
))}
{remainingSkills.length > 0 && (
<div
className={styles.skillPill}
title={remainingSkills.map(skill => skill.name)

Choose a reason for hiding this comment

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

Using Array.prototype.join without a separator defaults to a comma, which is fine here, but it might be clearer to explicitly specify the separator as ', ' for readability.

.join(', ')}
>
+
{remainingSkills.length}
</div>
)}
</div>
)
},
type: 'element',
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
}

.skillPill {
background-color: #aaaaaa;
background-color: #d6d6d6;
color: #333;
padding: 4px 8px;
border-radius: 10px;
white-space: break-spaces;
font-size: 14px;
font-size: 11px;
}

.status {
Expand Down