mirror of
https://github.com/MetaFam/TheGame.git
synced 2026-01-13 16:37:58 -05:00
31 lines
634 B
TypeScript
31 lines
634 B
TypeScript
import { SimpleGrid } from '@metafam/ds';
|
|
|
|
import { PlayerTile } from '#components/Player/PlayerTile';
|
|
import { Player } from '#graphql/autogen/hasura-sdk';
|
|
|
|
type Props = {
|
|
players: Player[];
|
|
showSeasonalXP?: boolean;
|
|
};
|
|
|
|
export const PlayerList: React.FC<Props> = ({
|
|
players,
|
|
showSeasonalXP = false,
|
|
}) => (
|
|
<SimpleGrid
|
|
columns={[1, null, 2, 3]}
|
|
spacing={8}
|
|
autoRows="minmax(35rem, auto)"
|
|
w="full"
|
|
maxW="7xl"
|
|
mx="auto"
|
|
>
|
|
{players.map((player, idx) => (
|
|
<PlayerTile
|
|
key={player.profile?.username ?? idx}
|
|
{...{ player, showSeasonalXP }}
|
|
/>
|
|
))}
|
|
</SimpleGrid>
|
|
);
|