Skip to content

Commit

Permalink
Fix tallying state
Browse files Browse the repository at this point in the history
  • Loading branch information
carlbarrdahl committed Feb 4, 2024
1 parent a33738e commit b0fe78e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils/state.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { isAfter } from "date-fns";
import { isAfter, isBefore } from "date-fns";
import { config } from "~/config";

type AppState = "APPLICATION" | "REVIEWING" | "VOTING" | "RESULTS" | "TALLYING";
Expand All @@ -9,7 +9,7 @@ export const getAppState = (): AppState => {
if (isAfter(config.registrationEndsAt, now)) return "APPLICATION";
if (isAfter(config.reviewEndsAt, now)) return "REVIEWING";
if (isAfter(config.votingEndsAt, now)) return "VOTING";
if (isAfter(config.resultsAt, now)) return "TALLYING";
if (isBefore(now, config.resultsAt)) return "TALLYING";

return "RESULTS";
};

0 comments on commit b0fe78e

Please sign in to comment.