Skip to content

Commit

Permalink
Merge pull request #542 from intuitem/hotfix/watchlist-date-state
Browse files Browse the repository at this point in the history
hotfix: watchlist date state tags
  • Loading branch information
ab-smith authored Jun 11, 2024
2 parents e3a90e6 + c0ed0e9 commit 8b91f9d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frontend/src/routes/(app)/analytics/+page.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ export const load: PageServerLoad = async ({ locals, fetch }) => {

function timeState(date: string) {
const eta = new Date(date);
if (eta.getDate() > TODAY.getDate()) {
if (eta.toLocaleDateString() > TODAY.toLocaleDateString()) {
return { name: 'incoming', hexcolor: '#93c5fd' };
} else if (eta.getDate() < TODAY.getDate()) {
} else if (eta.toLocaleDateString() < TODAY.toLocaleDateString()) {
return { name: 'outdated', hexcolor: '#f87171' };
} else {
return { name: 'today', hexcolor: '#fbbf24' };
Expand Down

0 comments on commit 8b91f9d

Please sign in to comment.