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

Loading…
Cancel
Save