Function
accentForIssues
(
issues: ReadonlyArray<{ priority?: string }>,
)
Source from the content-addressed store, hash-verified
| 56 | |
| 57 | /** Accent for a list: surface the hottest priority present, else Linear purple. */ |
| 58 | export function accentForIssues( |
| 59 | issues: ReadonlyArray<{ priority?: string }>, |
| 60 | ): string { |
| 61 | const prios = issues.map((i) => (i.priority ?? "").toLowerCase()); |
| 62 | if (prios.some((p) => p.includes("urgent"))) return ACCENT.urgent; |
| 63 | if (prios.some((p) => p.includes("high"))) return ACCENT.high; |
| 64 | return ACCENT.linear; |
| 65 | } |
Tested by
no test coverage detected