import { User } from '../../common/user' import { Row } from './layout/row' import { SiteLink } from './site-link' import { Title } from './title' export function Leaderboard(props: { title: string users: User[] columns: { header: string renderCell: (user: User) => any }[] }) { const { title, users, columns } = props return (
# | Name | {columns.map((column) => ({column.header} | ))}
---|---|---|
{index + 1} |
{user.name}
|
{columns.map((column) => (
{column.renderCell(user)} | ))}