Skip to content

Commit

Permalink
fix status color
Browse files Browse the repository at this point in the history
  • Loading branch information
warrenday committed Nov 21, 2024
1 parent c497f44 commit 495ca71
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/helpers/getStatusColor.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
const colors: Record<string, string> = {
"-1": "#6B7280",
"0": "#DC2626",
"200": "#10B981",
"300": "#FBBF24",
"400": "#DC2626",
"500": "#DC2626",
'-1': '#6B7280',
'0': '#DC2626',
'101': '#10B981',
'200': '#10B981',
'300': '#FBBF24',
'400': '#DC2626',
'500': '#DC2626',
}

export const getStatusColor = (status: number = 0): string => {
const statusCode = String(status)
return colors[statusCode] || colors["0"]
return colors[statusCode] || colors['0']
}

0 comments on commit 495ca71

Please sign in to comment.