fix(#2424): fixed destructuring

keep-around/b13bf04926aece605c273c572e2365c966d12ecf
Rakov Roman 4 years ago
parent ea52728198
commit b13bf04926
  1. 16
      src/features/TournamentList/index.tsx

@ -38,11 +38,11 @@ export const TournamentList = ({ matches }: TournamentTypeProps) => {
case isMobileDevice && isHomePage:
return (
<>
{tournamentSort?.map((tournament) => (
{tournamentSort?.map(({ id }) => (
<TournamentMobile
key={tournament.id}
tournament={tournaments[tournament.id].tournament}
tournamentMatches={tournaments[tournament.id].tournamentMatches}
key={id}
tournament={tournaments[id].tournament}
tournamentMatches={tournaments[id].tournamentMatches}
/>
))}
</>
@ -50,11 +50,11 @@ export const TournamentList = ({ matches }: TournamentTypeProps) => {
case isHomePage && matches.length >= 12:
return (
<>
{tournamentSort?.map((tournament) => (
{tournamentSort?.map(({ id }) => (
<CollapseTournament
key={tournament.id}
tournament={tournaments[tournament.id].tournament}
tournamentMatches={tournaments[tournament.id].tournamentMatches}
key={id}
tournament={tournaments[id].tournament}
tournamentMatches={tournaments[id].tournamentMatches}
/>
))}
</>

Loading…
Cancel
Save