import { useParams } from "react-router-dom"; import { Algorithm as AlgorithmType, BenchmarkData } from "../types"; import { BenchmarkCharts } from "../components/benchmark/charts/BenchmarkCharts"; import { useBenchmarkChartData } from "../hooks/useBenchmarkChartData"; import { BenchmarkTable } from "../components/benchmark/table/BenchmarkTable"; interface AlgorithmProps { algorithms: AlgorithmType[]; benchmarkData: BenchmarkData | null; } function Algorithm({ algorithms, benchmarkData }: AlgorithmProps) { const { algorithmName } = useParams<{ algorithmName: string }>(); const algorithm = algorithms.find((a) => a.name === algorithmName); const chartData = useBenchmarkChartData( benchmarkData?.results || [], null, algorithm?.name || null, ); if (!algorithm) { return
{algorithm.description}