fix: made statistic dates PATRIOTIC
This commit is contained in:
@@ -6,6 +6,7 @@ import { Skeleton, Stack } from "@mantine/core";
|
||||
import { ProfitChartFiltersModal } from "../../modals/ProfitChartFiltersModal.tsx";
|
||||
import { Total } from "../Total/Total.tsx";
|
||||
import styles from "../../../../ui/StatisticsPage.module.css";
|
||||
import { formatDate } from "../../../../../../types/utils.ts";
|
||||
|
||||
|
||||
export const ProfitChart = () => {
|
||||
@@ -15,6 +16,12 @@ export const ProfitChart = () => {
|
||||
isLoading,
|
||||
} = useProfitChart();
|
||||
|
||||
const formattedProfitData = profitData.map(
|
||||
value => {
|
||||
return { ...value, date: formatDate(value.date) };
|
||||
},
|
||||
);
|
||||
|
||||
const getChartsSeries = [
|
||||
[
|
||||
{ name: "profit", label: "Прибыль", color: "indigo.6" },
|
||||
@@ -42,7 +49,7 @@ export const ProfitChart = () => {
|
||||
my={"sm"}
|
||||
w={"98%"}
|
||||
h={"34vh"}
|
||||
data={profitData}
|
||||
data={formattedProfitData}
|
||||
dataKey="date"
|
||||
unit={units[idx]}
|
||||
tooltipAnimationDuration={200}
|
||||
|
||||
Reference in New Issue
Block a user