import { cn } from 'ui' interface QueryCostsProps { currentCost?: number improvedCost?: number improvement?: number className?: string } export const QueryCosts = ({ currentCost, improvedCost, improvement, className, }: QueryCostsProps) => { if (!currentCost) return null return (

Query costs

Total cost of query

Currently:

{currentCost.toFixed(2)}

{improvedCost && (

With index:

{improvedCost.toFixed(2)}

{improvement &&

↓ {improvement.toFixed(1)}%

}
)}
) }