fix key error in skeleton loaders
This commit is contained in:
@@ -13,7 +13,7 @@ const PlayerList = ({ players, loading = false }: PlayerListProps) => {
|
|||||||
|
|
||||||
if (loading) return <List>
|
if (loading) return <List>
|
||||||
{Array.from({ length: 10 }).map((_, i) => (
|
{Array.from({ length: 10 }).map((_, i) => (
|
||||||
<ListItem py='xs'
|
<ListItem py='xs' key={`skeleton-${i}`}
|
||||||
icon={<Skeleton circle height={40} width={40} />}
|
icon={<Skeleton circle height={40} width={40} />}
|
||||||
>
|
>
|
||||||
<Skeleton height={20} width={200} />
|
<Skeleton height={20} width={200} />
|
||||||
|
|||||||
@@ -13,8 +13,7 @@ const TeamList = ({ teams, loading = false }: TeamListProps) => {
|
|||||||
|
|
||||||
if (loading) return <List>
|
if (loading) return <List>
|
||||||
{Array.from({ length: 10 }).map((_, i) => (
|
{Array.from({ length: 10 }).map((_, i) => (
|
||||||
<ListItem py='xs'
|
<ListItem key={`skeleton-${i}`} py='xs' icon={<Skeleton height={40} width={40} />}
|
||||||
icon={<Skeleton height={40} width={40} />}
|
|
||||||
>
|
>
|
||||||
<Skeleton height={35} width={200} />
|
<Skeleton height={35} width={200} />
|
||||||
</ListItem>
|
</ListItem>
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ const TournamentList = ({ tournaments, loading = false }: TournamentListProps) =
|
|||||||
|
|
||||||
if (loading) return <List>
|
if (loading) return <List>
|
||||||
{Array.from({ length: 10 }).map((_, i) => (
|
{Array.from({ length: 10 }).map((_, i) => (
|
||||||
<ListItem py='xs'
|
<ListItem py='xs' key={`skeleton-${i}`}
|
||||||
icon={<Skeleton height={40} width={40} />}
|
icon={<Skeleton height={40} width={40} />}
|
||||||
>
|
>
|
||||||
<Skeleton height={20} width={200} />
|
<Skeleton height={20} width={200} />
|
||||||
|
|||||||
Reference in New Issue
Block a user