import React from "react"; import Chart from "../Chart"; import { Link } from "react-router-dom"; import { Exchange } from "../../types"; const Burns = (props: { exchanges: Exchange[]; executed: number; percent: number; }) => { const { exchanges, executed, percent } = props; if (!exchanges) return
; const data = exchanges.map((b) => { return { time: b.logTime.split("T")[0], amount: Math.floor(b.amountUSD), status: b.status, }; }); const pctRounded = (100 * percent).toFixed(2); return (
o.status === "PENDING" ? `bg-warning` : `bg-danger` } />
Total Amount Burned: {executed.toFixed(2)} M JOY ({pctRounded}%) -{" "} Top Burners
); }; export default Burns;