25 lines
875 B
TypeScript
25 lines
875 B
TypeScript
import { fiscalQaRows } from "@/lib/fiscal-qa-preview";
|
|
|
|
export default function FiscalQaPreview({ snapshot }: { snapshot: unknown }) {
|
|
const rows = fiscalQaRows(snapshot);
|
|
if (rows.length === 0) return null;
|
|
return (
|
|
<section
|
|
aria-label="Resultado fiscal preservado"
|
|
className="my-3 rounded border border-amber-700 bg-amber-50 p-3"
|
|
>
|
|
<h5 className="font-semibold">
|
|
{rows[0][1]} — cálculo exacto sem arredondamento
|
|
</h5>
|
|
<dl className="mt-2 space-y-2 text-sm">
|
|
{rows.map(([label, value]) => (
|
|
<div key={label}>
|
|
<dt className="font-medium">{label}</dt>
|
|
<dd className="break-all">{value}</dd>
|
|
</div>
|
|
))}
|
|
</dl>
|
|
</section>
|
|
);
|
|
}
|