import { generateYAxis } from '@/app/lib/utils'; import { CalendarIcon } from '@heroicons/react/24/outline'; import { lusitana } from '@/app/ui/fonts'; import {fetchRevenue} from "@/app/lib/data"; // This component is representational only. // For data visualization UI, check out: // https://www.tremor.so/ // https://www.chartjs.org/ // https://airbnb.io/visx/ export default async function RevenueChart() { const revenue = await fetchRevenue(); const chartHeight = 350; const { yAxisLabels, topLabel } = generateYAxis(revenue); if (!revenue || revenue.length === 0) { return

No data available.

; } return (

최근 매출액

{/* NOTE: Uncomment this code in Chapter 7 */}
{yAxisLabels.map((label) => (

{label}

))}
{revenue.map((month) => (

{month.month}

))}

최근 12개월 동향

); }