Skip to content

Commit

Permalink
Fix linting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
shrir committed Jan 8, 2025
1 parent 89ba3af commit edc2474
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 25 deletions.
34 changes: 18 additions & 16 deletions frontend/src/components/opportunities/OpportunityContacts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -393,24 +393,26 @@ export function OpportunityContacts({
: contact.skills.join(" . ")
: "Empty"
: // If not expanded, show truncated version
contact.skills && contact.skills.length > 0
? icp
? contact.skills
.filter((item) =>
icp.tool.include.some(
(el) =>
el.toLowerCase() === item.toLowerCase()
contact.skills && contact.skills.length > 0
? icp
? contact.skills
.filter((item) =>
icp.tool.include.some(
(el) =>
el.toLowerCase() ===
item.toLowerCase()
)
)
)
.concat(
contact.skills.filter(
(item) => !icp.tool.include.includes(item)
.concat(
contact.skills.filter(
(item) =>
!icp.tool.include.includes(item)
)
)
)
.slice(0, 5) // Show only the first skill
.join(" · ")
: contact.skills.slice(0, 1).join(" . ")
: "Empty"}
.slice(0, 5) // Show only the first skill
.join(" · ")
: contact.skills.slice(0, 1).join(" . ")
: "Empty"}
</p>
<button
className="ml-2 text-primary hover:underline"
Expand Down
8 changes: 4 additions & 4 deletions frontend/src/components/opportunities/columns.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -661,10 +661,10 @@ export function getFixedColumns(
valueA.engineering > valueB.engineering
? 1
: valueA.engineering !== null &&
valueB.engineering !== null &&
valueA.engineering < valueB.engineering
? -1
: 0
valueB.engineering !== null &&
valueA.engineering < valueB.engineering
? -1
: 0
},
enableHiding: true,
enableSorting: true,
Expand Down
41 changes: 36 additions & 5 deletions frontend/src/utils/chapter/funding.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,40 @@
import { FundingRound } from "@/types/company"

export function getFundingRoundColor(roundName: FundingRound | undefined | null): "teal" | "lime" | "yellow" | "orange" | "red" | "amber" | "pink" | "indigo" | "violet" | "emerald" | "cyan" | "sky" | "green" | "zinc" {
export function getFundingRoundColor(
roundName: FundingRound | undefined | null
):
| "teal"
| "lime"
| "yellow"
| "orange"
| "red"
| "amber"
| "pink"
| "indigo"
| "violet"
| "emerald"
| "cyan"
| "sky"
| "green"
| "zinc" {
if (!roundName) return "zinc"

const colorMap: Record<FundingRound, "teal" | "lime" | "yellow" | "orange" | "red" | "amber" | "pink" | "indigo" | "violet" | "emerald" | "cyan" | "sky" | "green"> = {

const colorMap: Record<
FundingRound,
| "teal"
| "lime"
| "yellow"
| "orange"
| "red"
| "amber"
| "pink"
| "indigo"
| "violet"
| "emerald"
| "cyan"
| "sky"
| "green"
> = {
[FundingRound.PRE_SEED]: "teal",
[FundingRound.SEED]: "lime",
[FundingRound.SERIES_A]: "yellow",
Expand All @@ -18,8 +49,8 @@ export function getFundingRoundColor(roundName: FundingRound | undefined | null)
[FundingRound.CORPORATE_ROUND]: "teal",
[FundingRound.DEBT_FINANCING]: "sky",
[FundingRound.GRANT]: "green",
[FundingRound.SERIES_UNKNOWN]: "green"
[FundingRound.SERIES_UNKNOWN]: "green",
}

return colorMap[roundName] || "zinc"
}
}

0 comments on commit edc2474

Please sign in to comment.