import { Table } from "antd"; import { TStat } from "../../types/Statistic/TStat"; import { QueryObserverResult, RefetchOptions, RefetchQueryFilters, } from "react-query"; // @ts-ignore import tagIcon from "../../assets/tagIcon.png"; const StatTable = ({ data, isLoading, refetch, }: { refetch: ( options?: (RefetchOptions & RefetchQueryFilters) | undefined ) => Promise>; data: { data: TStat[] | undefined }; isLoading: boolean; }) => { return (
({ no: i + 1, ...u, }))} columns={[ { title: , dataIndex: "no", key: "no", width: "5%", }, { title: "Support specialist", dataIndex: "username", key: "username", }, { title: "Team", dataIndex: "team_name", key: "team_name ", }, { title: "Points", dataIndex: "total_points", key: "total_points", }, ]} pagination={{ pageSize: 10, size: "default", }} rowClassName={(record, index) => index % 2 === 0 ? "odd-row" : "even-row" } bordered /> ); }; export default StatTable;