Files
TheGame/packages/web/components/Player/PlayerList.tsx
δυς f5295c3242 Reading and Writing Profile Info From Ceramic (#943)
This is being merged for further testing so as to not block the progress of `develop` & not require more rebases.
2022-01-25 16:51:53 -05:00

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>
);