forked from Transparency/kgroad-frontend2
fix date
This commit is contained in:
parent
4f26c31c36
commit
aa4bf468cd
@ -1,14 +0,0 @@
|
||||
export const MONTHS: Record<string, string> = {
|
||||
"01": "Январь",
|
||||
"02": "Февраль",
|
||||
"03": "Март",
|
||||
"04": "Апрель",
|
||||
"05": "Май",
|
||||
"06": "Июнь",
|
||||
"07": "Июль",
|
||||
"08": "Август",
|
||||
"09": "Сентябрь",
|
||||
"10": "Октябрь",
|
||||
"11": "Ноябрь",
|
||||
"12": "Декабрь",
|
||||
};
|
@ -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<IReportInformationProps> = async ({
|
||||
<div className="report-information__date">
|
||||
<Image src={calendar} alt="Calendar Icon" />
|
||||
<p>
|
||||
{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'
|
||||
})}
|
||||
</p>
|
||||
</div>
|
||||
<ReportLike count={total_likes} report_id={id} />
|
||||
|
Loading…
Reference in New Issue
Block a user