Skip to content

Commit

Permalink
fix date shown in resync error modal
Browse files Browse the repository at this point in the history
  • Loading branch information
JeromeBu committed Oct 10, 2024
1 parent 4b724c0 commit f12e626
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions shared/src/errors/errors.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { format } from "date-fns";
import { LocationId } from "../address/address.dto";
import { AgencyId } from "../agency/agency.dto";
import {
Expand Down Expand Up @@ -29,6 +28,7 @@ import { Role } from "../role/role.dto";
import { AppellationCode } from "../romeAndAppellationDtos/romeAndAppellation.dto";
import { ShortLinkId } from "../shortLink/shortLink.dto";
import { SiretDto } from "../siret/siret";
import { toDisplayedDate } from "../utils/date";
import {
BadRequestError,
ConflictError,
Expand Down Expand Up @@ -375,10 +375,11 @@ export const errors = {
formattedWaitingTime: string;
}) =>
new TooManyRequestApiError(
`La convention a été synchronisée le ${format(
params.lastBroadcastDate,
"dd/MM/yyyy 'à' hh'h'mm",
)}. Merci d'essayer à nouveau dans ${params.formattedWaitingTime}.`,
`La convention a été synchronisée le ${toDisplayedDate({
date: params.lastBroadcastDate,
withHours: true,
showGMT: true,
})}. Merci d'essayer à nouveau dans ${params.formattedWaitingTime}.`,
),
},
discussion: {
Expand Down

0 comments on commit f12e626

Please sign in to comment.