Files
openmonetis/components/top-estabelecimentos/highlights-cards.tsx
Felipe Coutinho a7f63fb77a refactor: migrate from ESLint to Biome and extract SQL queries to data.ts
- Replace ESLint with Biome for linting and formatting
- Configure Biome with tabs, double quotes, and organized imports
- Move all SQL/Drizzle queries from page.tsx files to data.ts files
- Create new data.ts files for: ajustes, dashboard, relatorios/categorias
- Update existing data.ts files: extrato, fatura (add lancamentos queries)
- Remove all drizzle-orm imports from page.tsx files
- Update README.md with new tooling info

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 13:15:37 +00:00

52 lines
2.0 KiB
TypeScript

"use client";
import { RiFireLine, RiTrophyLine } from "@remixicon/react";
import { Card, CardContent } from "@/components/ui/card";
import type { TopEstabelecimentosData } from "@/lib/top-estabelecimentos/fetch-data";
type HighlightsCardsProps = {
summary: TopEstabelecimentosData["summary"];
};
export function HighlightsCards({ summary }: HighlightsCardsProps) {
return (
<div className="grid gap-3 sm:grid-cols-2">
<Card className="bg-linear-to-br from-amber-50 to-orange-50/50 dark:from-amber-950/20 dark:to-orange-950/10 border-amber-200/50 dark:border-amber-800/30">
<CardContent className="p-4">
<div className="flex items-center gap-3">
<div className="flex items-center justify-center size-10 rounded-xl bg-amber-100 dark:bg-amber-900/40 shadow-sm">
<RiTrophyLine className="size-5 text-amber-600 dark:text-amber-400" />
</div>
<div className="min-w-0 flex-1">
<p className="text-xs text-amber-700/80 dark:text-amber-400/80 font-medium">
Mais Frequente
</p>
<p className="font-semibold text-amber-900 dark:text-amber-100 truncate">
{summary.mostFrequent || "—"}
</p>
</div>
</div>
</CardContent>
</Card>
<Card className="bg-linear-to-br from-red-50 to-rose-50/50 dark:from-red-950/20 dark:to-rose-950/10 border-red-200/50 dark:border-red-800/30">
<CardContent className="p-4">
<div className="flex items-center gap-3">
<div className="flex items-center justify-center size-10 rounded-xl bg-red-100 dark:bg-red-900/40 shadow-sm">
<RiFireLine className="size-5 text-red-600 dark:text-red-400" />
</div>
<div className="min-w-0 flex-1">
<p className="text-xs text-red-700/80 dark:text-red-400/80 font-medium">
Maior Gasto Total
</p>
<p className="font-semibold text-red-900 dark:text-red-100 truncate">
{summary.highestSpending || "—"}
</p>
</div>
</div>
</CardContent>
</Card>
</div>
);
}