mirror of https://github.com/morpheus65535/bazarr
41 lines
946 B
TypeScript
41 lines
946 B
TypeScript
import { SimpleTable } from "@/components";
|
|
import { Text } from "@mantine/core";
|
|
import { FunctionComponent, useMemo } from "react";
|
|
import { Column } from "react-table";
|
|
|
|
interface Props {
|
|
health: readonly System.Health[];
|
|
}
|
|
|
|
const Table: FunctionComponent<Props> = ({ health }) => {
|
|
const columns: Column<System.Health>[] = useMemo<Column<System.Health>[]>(
|
|
() => [
|
|
{
|
|
Header: "Object",
|
|
accessor: "object",
|
|
Cell: ({ value }) => {
|
|
return <Text className="table-no-wrap">{value}</Text>;
|
|
},
|
|
},
|
|
{
|
|
Header: "Issue",
|
|
accessor: "issue",
|
|
Cell: ({ value }) => {
|
|
return <Text className="table-primary">{value}</Text>;
|
|
},
|
|
},
|
|
],
|
|
[],
|
|
);
|
|
|
|
return (
|
|
<SimpleTable
|
|
columns={columns}
|
|
data={health}
|
|
tableStyles={{ emptyText: "No issues with your configuration" }}
|
|
></SimpleTable>
|
|
);
|
|
};
|
|
|
|
export default Table;
|