import { Link } from "react-router-dom";
import { TagFilter } from "../TagFilter";
import { Dataset, Algorithm } from "../../types";
interface DatasetTableProps {
filteredDatasets: Dataset[];
availableDatasetTags: string[];
datasetTags: string[];
toggleDatasetTag: (tag: string) => void;
}
interface AlgorithmTableProps {
filteredAlgorithms: Algorithm[];
availableAlgorithmTags: string[];
algorithmTags: string[];
toggleAlgorithmTag: (tag: string) => void;
}
export const DatasetTable = ({
filteredDatasets,
availableDatasetTags,
datasetTags,
toggleDatasetTag,
}: DatasetTableProps) => (
|
Name
|
Version
|
Description
|
Tags
|
Source
|
Data
|
{filteredDatasets.map((dataset, index) => (
|
{dataset.name}
|
{dataset.version}
|
{dataset.description}
|
{dataset.tags.map((tag) => (
{tag}
))}
|
{dataset.source_file && (
View Source
)}
|
{dataset.data_url_npy && (
Download
)}
|
))}
);
export const AlgorithmTable = ({
filteredAlgorithms,
availableAlgorithmTags,
algorithmTags,
toggleAlgorithmTag,
}: AlgorithmTableProps) => (
|
Name
|
Version
|
Description
|
Tags
|
Source
|
{filteredAlgorithms.map((algorithm, index) => (
|
{algorithm.name}
|
{algorithm.version}
|
{algorithm.description}
|
{algorithm.tags.map((tag) => (
{tag}
))}
|
{algorithm.source_file && (
View Source
)}
|
))}
);