aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/docs/components/pages/TRPG-home/DocsBenchmarksGraph.tsx
blob: 7fb9d55d742b42cada82955715ebef081c246289 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import { useState } from "react";
import {
  BenchmarkBar,
  BenchmarkCategory,
  BenchmarkNumberOfModules,
} from "./PackBenchmarks";
import { BenchmarksGraph } from "./PackBenchmarksGraph";
import { PackBenchmarksPicker } from "./PackBenchmarksPicker";

export function DocsBenchmarksGraph(props: {
  bars: BenchmarkBar[];
  category: BenchmarkCategory;
}) {
  const [numberOfModules, setNumberOfModules] =
    useState<BenchmarkNumberOfModules>("1000");
  return (
    <div className="my-10">
      <BenchmarksGraph
        bars={props.bars}
        category={props.category}
        numberOfModules={numberOfModules}
        pinTime
      />
      <div className="flex justify-center mt-6">
        <PackBenchmarksPicker
          setNumberOfModules={setNumberOfModules}
        ></PackBenchmarksPicker>
      </div>
    </div>
  );
}