Skip to content

Commit

Permalink
Fix leaderboard dates (#482)
Browse files Browse the repository at this point in the history
  • Loading branch information
ruilopesm authored Feb 15, 2023
1 parent 5012bc5 commit 4b35cfa
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions layout/Attendee/Leaderboard/Leaderboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,8 @@ function Leaderboard() {
const min_date = "2023/02/14";
const max_date = "2023/02/17";

const _today = new Date();
const today =
_today.getFullYear() +
"-" +
(_today.getMonth() + 1) +
"-" +
_today.getDate();
const _today = new Date().toISOString().split("T")[0];
const today = _today.replace(/-/g, "/");
const defaultDate = isAfter(today, min_date) ? today : min_date;

const { user } = useAuth();
Expand Down

0 comments on commit 4b35cfa

Please sign in to comment.