move static data
This commit is contained in:
19
adapters/bootstrap/IncidentConfig.ts
Normal file
19
adapters/bootstrap/IncidentConfig.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
/**
|
||||
* Incident Configuration
|
||||
*
|
||||
* UI display configuration for incident badges
|
||||
*/
|
||||
|
||||
export interface IncidentConfigData {
|
||||
color: string;
|
||||
}
|
||||
|
||||
export const getIncidentBadgeColor = (incidents: number): string => {
|
||||
if (incidents === 0) return 'green';
|
||||
if (incidents <= 2) return 'yellow';
|
||||
return 'red';
|
||||
};
|
||||
|
||||
export const incidentConfig = {
|
||||
getIncidentBadgeColor,
|
||||
} as const;
|
||||
Reference in New Issue
Block a user