kleros/kleros-v2

View on GitHub
web/src/pages/Home/CourtOverview/StakedPNKByCourtsChart.tsx

Summary

Maintainability
A
2 hrs
Test Coverage
import React from "react";
import BarChart, { IBarChartData } from "./BarChart";

export type StakedPNKByCourtsChartData = { labels: string[]; stakes: number[]; totalStake: number };

interface IStakedPNKByCourtsChart {
  data: StakedPNKByCourtsChartData;
}

const StakedPNKByCourtsChart: React.FC<IStakedPNKByCourtsChart> = ({ data }) => {
  const chartData: IBarChartData = {
    labels: data.labels,
    data: data.stakes,
    total: data.totalStake,
  };

  return <BarChart chartData={chartData} />;
};

export default StakedPNKByCourtsChart;