Skip to content

Commit

Permalink
fix: dispatch time to text color logic
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Trost <[email protected]>
  • Loading branch information
galexrt committed Aug 27, 2024
1 parent 4127bae commit 4ae2fd1
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions app/components/centrum/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,18 +137,18 @@ export function dispatchTimeToTextColor(
const time = (Date.now() - toDate(date).getTime()) / 1000;

const over = time / maxTime;
if (over >= 0.1) {
return 'text-yellow-100';
} else if (over >= 0.2) {
return 'text-yellow-300';
} else if (over >= 0.35) {
return 'text-orange-300';
} else if (over >= 0.55) {
return 'text-orange-400';
if (over >= 0.85) {
return 'text-red-700 animate-bounce';
} else if (over >= 0.7) {
return 'text-red-400';
} else if (over > 0.85) {
return 'text-red-700 animate-bounce';
} else if (over >= 0.55) {
return 'text-orange-400';
} else if (over >= 0.35) {
return 'text-orange-300';
} else if (over >= 0.2) {
return 'text-yellow-300';
} else if (over >= 0.1) {
return 'text-yellow-100';
}

return '';
Expand Down

0 comments on commit 4ae2fd1

Please sign in to comment.