fix key error in skeleton loaders

This commit is contained in:
yohlo
2025-08-25 19:38:21 -05:00
parent 4faa853c4c
commit d845254c3d
3 changed files with 3 additions and 4 deletions

View File

@@ -13,7 +13,7 @@ const PlayerList = ({ players, loading = false }: PlayerListProps) => {
if (loading) return <List>
{Array.from({ length: 10 }).map((_, i) => (
<ListItem py='xs'
<ListItem py='xs' key={`skeleton-${i}`}
icon={<Skeleton circle height={40} width={40} />}
>
<Skeleton height={20} width={200} />

View File

@@ -13,8 +13,7 @@ const TeamList = ({ teams, loading = false }: TeamListProps) => {
if (loading) return <List>
{Array.from({ length: 10 }).map((_, i) => (
<ListItem py='xs'
icon={<Skeleton height={40} width={40} />}
<ListItem key={`skeleton-${i}`} py='xs' icon={<Skeleton height={40} width={40} />}
>
<Skeleton height={35} width={200} />
</ListItem>

View File

@@ -13,7 +13,7 @@ const TournamentList = ({ tournaments, loading = false }: TournamentListProps) =
if (loading) return <List>
{Array.from({ length: 10 }).map((_, i) => (
<ListItem py='xs'
<ListItem py='xs' key={`skeleton-${i}`}
icon={<Skeleton height={40} width={40} />}
>
<Skeleton height={20} width={200} />