type TableProps = { columns: { key: string; title: string }[]; data: Array>; title: string; }; const Table = ({ columns, data, title }: TableProps) => { return (

{title}

{columns.map((column, index) => ( ))} {data.map((row, index) => ( {columns.map((column, index) => ( ))} ))}
{column.title}
{row[column.key]}
); }; export default Table;