refactor: remove unused imports and CardFooter from AovTrendChart component
This commit is contained in:
parent
861cd6d26f
commit
e74eff77f2
@ -1,15 +1,13 @@
|
||||
"use client"
|
||||
|
||||
import { TrendingUp } from "lucide-react"
|
||||
import { CartesianGrid, Line, LineChart, XAxis, YAxis } from "recharts"
|
||||
|
||||
import {
|
||||
Card,
|
||||
CardContent,
|
||||
CardDescription,
|
||||
CardFooter,
|
||||
CardHeader,
|
||||
CardTitle,
|
||||
CardTitle
|
||||
} from "@/components/ui/card"
|
||||
import {
|
||||
ChartContainer,
|
||||
@ -28,14 +26,14 @@ const chartConfig = {
|
||||
},
|
||||
} satisfies ChartConfig
|
||||
|
||||
export function AovTrendChart({
|
||||
data,
|
||||
title = "Tren AOV",
|
||||
description = "Rata-rata nilai belanja per pesanan pelanggan setiap bulannya."
|
||||
}: {
|
||||
data: any[],
|
||||
title?: string,
|
||||
description?: string
|
||||
export function AovTrendChart({
|
||||
data,
|
||||
title = "Tren AOV",
|
||||
description = "Rata-rata nilai belanja per pesanan pelanggan setiap bulannya."
|
||||
}: {
|
||||
data: any[],
|
||||
title?: string,
|
||||
description?: string
|
||||
}) {
|
||||
return (
|
||||
<Card>
|
||||
@ -62,21 +60,21 @@ export function AovTrendChart({
|
||||
tickFormatter={(value) => value.slice(0, 3)}
|
||||
/>
|
||||
<YAxis
|
||||
tickLine={false}
|
||||
axisLine={false}
|
||||
tickMargin={8}
|
||||
tickFormatter={formatShortCurrency}
|
||||
width={60}
|
||||
tickLine={false}
|
||||
axisLine={false}
|
||||
tickMargin={8}
|
||||
tickFormatter={formatShortCurrency}
|
||||
width={60}
|
||||
/>
|
||||
<ChartTooltip
|
||||
cursor={false}
|
||||
content={
|
||||
<ChartTooltipContent
|
||||
hideLabel
|
||||
formatter={(value, name) => [
|
||||
formatCurrency(Number(value)),
|
||||
` - ${chartConfig[name as keyof typeof chartConfig]?.label ?? name}`,
|
||||
]}
|
||||
<ChartTooltipContent
|
||||
hideLabel
|
||||
formatter={(value, name) => [
|
||||
formatCurrency(Number(value)),
|
||||
` - ${chartConfig[name as keyof typeof chartConfig]?.label ?? name}`,
|
||||
]}
|
||||
/>
|
||||
}
|
||||
/>
|
||||
@ -95,14 +93,6 @@ export function AovTrendChart({
|
||||
</LineChart>
|
||||
</ChartContainer>
|
||||
</CardContent>
|
||||
<CardFooter className="flex-col items-start gap-2 text-sm">
|
||||
<div className="flex gap-2 leading-none font-medium">
|
||||
Menampilkan tren kualitas belanja pelanggan <TrendingUp className="h-4 w-4" />
|
||||
</div>
|
||||
<div className="leading-none text-muted-foreground">
|
||||
Berdasarkan data operasional Januari - Desember
|
||||
</div>
|
||||
</CardFooter>
|
||||
</Card>
|
||||
)
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user