mirror of
https://github.com/MetaFam/TheGame.git
synced 2026-04-24 03:00:09 -04:00
This is being merged for further testing so as to not block the progress of `develop` & not require more rebases.
28 lines
611 B
TypeScript
28 lines
611 B
TypeScript
import { SimpleGrid } from '@metafam/ds';
|
|
import { PlayerTile } from 'components/Player/PlayerTile';
|
|
import { Player } from 'graphql/autogen/types';
|
|
import React from 'react';
|
|
|
|
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)"
|
|
>
|
|
{players.map((player, idx) => (
|
|
<PlayerTile
|
|
key={player.profile?.username ?? idx}
|
|
{...{ player, showSeasonalXP }}
|
|
/>
|
|
))}
|
|
</SimpleGrid>
|
|
);
|