Template genérico de checkout com ASAAS, parametrizado via env vars. Inclui fluxo completo: checkout → pedido → polling → webhook → admin. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
33 lines
888 B
TypeScript
33 lines
888 B
TypeScript
"use client"
|
|
|
|
import { Bar, BarChart, ResponsiveContainer, XAxis, YAxis } from "recharts"
|
|
|
|
interface OverviewProps {
|
|
data: number[]
|
|
}
|
|
|
|
export function Overview({ data }: OverviewProps) {
|
|
const months = ["Jan", "Fev", "Mar", "Abr", "Mai", "Jun", "Jul", "Ago", "Set", "Out", "Nov", "Dez"]
|
|
|
|
const chartData = data.map((value, index) => ({
|
|
name: months[index],
|
|
total: value,
|
|
}))
|
|
|
|
return (
|
|
<ResponsiveContainer width="100%" height={350}>
|
|
<BarChart data={chartData}>
|
|
<XAxis dataKey="name" stroke="#888888" fontSize={12} tickLine={false} axisLine={false} />
|
|
<YAxis
|
|
stroke="#888888"
|
|
fontSize={12}
|
|
tickLine={false}
|
|
axisLine={false}
|
|
tickFormatter={(value) => `R$${value}`}
|
|
/>
|
|
<Bar dataKey="total" fill="#adfa1d" radius={[4, 4, 0, 0]} />
|
|
</BarChart>
|
|
</ResponsiveContainer>
|
|
)
|
|
}
|