Skip to content

Commit

Permalink
hotfix: watchlist date state tags
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohamed-Hacene committed Jun 11, 2024
1 parent 45c91dd commit c0ed0e9
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 c0ed0e9

Please sign in to comment.