Skip to content

Commit

Permalink
Merge pull request #84 from edenia/feat/ui-changes
Browse files Browse the repository at this point in the history
feat(components): changed date format
  • Loading branch information
xavier506 authored Mar 10, 2023
2 parents 16053d1 + db9b28d commit 66498f0
Showing 1 changed file with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import React, { useState } from "react";
import { useQueryClient } from "react-query";
import dayjs from "dayjs";
import utc from "dayjs/plugin/utc";

dayjs.extend(utc);

import {
delay,
Expand Down Expand Up @@ -88,11 +91,11 @@ export const ParticipationCard = ({ election }: Props) => {
return <Text>{(e as Error).message}</Text>;
}

const electionDate = electionDates.startDateTime.format("LL");
const electionStartTime = electionDates.startDateTime.format("LT z");
const electionParticipationLimitTime = electionDates.participationTimeLimit.format(
"LLL z"
);
const electionDate = electionDates.startDateTime.utc().format("LL");
const electionStartTime = electionDates.startDateTime.utc().format("LT");
const electionParticipationLimitTime = electionDates.participationTimeLimit
.utc()
.format("LLL");

const isPastElectionParticipationTimeLimit = dayjs().isAfter(
electionDates.participationTimeLimit
Expand Down

0 comments on commit 66498f0

Please sign in to comment.