diff --git a/src/shared/variables/month.ts b/src/shared/variables/month.ts deleted file mode 100644 index 4ab411f..0000000 --- a/src/shared/variables/month.ts +++ /dev/null @@ -1,14 +0,0 @@ -export const MONTHS: Record = { - "01": "Январь", - "02": "Февраль", - "03": "Март", - "04": "Апрель", - "05": "Май", - "06": "Июнь", - "07": "Июль", - "08": "Август", - "09": "Сентябрь", - "10": "Октябрь", - "11": "Ноябрь", - "12": "Декабрь", -}; diff --git a/src/widgets/report-details/ReportInformation/ReportInformation.tsx b/src/widgets/report-details/ReportInformation/ReportInformation.tsx index 4217599..043878b 100644 --- a/src/widgets/report-details/ReportInformation/ReportInformation.tsx +++ b/src/widgets/report-details/ReportInformation/ReportInformation.tsx @@ -6,7 +6,6 @@ import { ILocation } from "@/shared/types/location-type"; import calendar from "./icons/calendar.svg"; import { ROAD_TYPES_COLORS } from "@/shared/variables/road-types"; import Image from "next/image"; -import { MONTHS } from "@/shared/variables/month"; import ShowMapButton from "@/features/ShowMapButton/ShowMapButton"; import { getTranslations } from "next-intl/server"; @@ -49,11 +48,11 @@ const ReportInformation: React.FC = async ({
Calendar Icon

- {MONTHS[date.slice(5, 7)]}{" "} - {date.slice(5, 7).slice(0, 1) === "0" - ? date.slice(6, 7) - : date.slice(5, 7)} - , {date.slice(0, 4)} + {new Date(date).toLocaleDateString('ru-RU', { + day: 'numeric', + month: 'long', + year: 'numeric' + })}