Skip to content

Commit 63d2e30

Browse files
sehyun0518sageherb
authored andcommitted
feat(auction-detail-log): auction log chart x 순서 변경
1 parent 8666058 commit 63d2e30

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/features/auction/auction-log/ui/auction-log-chart.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
"use client";
22

3+
import { useMemo } from "react";
4+
35
import { Area, AreaChart, CartesianGrid, XAxis } from "recharts";
46

57
import type { RecentPriceHistoryType } from "@/features/auction/auction-log/model/types";
@@ -13,13 +15,14 @@ const chartConfig = {
1315
} satisfies ChartConfig;
1416

1517
export default function AuctionLogChart({ item }: { item: RecentPriceHistoryType[] }) {
18+
const reversedData = useMemo(() => item.toReversed(), [item]);
1619
return (
1720
<div className="flex flex-col gap-3">
1821
<h3 className="text-base font-medium">관심도</h3>
1922
<ChartContainer config={chartConfig}>
2023
<AreaChart
2124
accessibilityLayer
22-
data={item}
25+
data={reversedData}
2326
margin={{
2427
left: 0,
2528
right: 0,

0 commit comments

Comments
 (0)