import { FC } from "react"; export const DiceChart: FC<{ dice: Record }> = ({ dice }) => { const data = Object.entries(dice).sort((a, b) => Number(a[0]) - Number(b[0])); const max = Math.max(...data.map((d) => d[1])); const _min = Math.min(...data.map((d) => d[1])); const uniqueValues = Array.from(new Set(data.map((d) => d[1]))); return (
{uniqueValues.map((_, i) => (
{/*
{Math.round(max / uniqueValues.length) * (i + 1)} {}
*/}
))}
{data.map((d) => (
{d[0]}
))}
); };