Skip to content

Commit

Permalink
[BUGFIX] Fix mages not being removed from the recruited list after
Browse files Browse the repository at this point in the history
rerecruiting

Issue: #455

Mages stayed in the recruited list after rerecruiting because they were
distinguished by name (which is a non unique feature any more). The key
has been adapted to be the id instead.
  • Loading branch information
sarathas authored and on3iro committed Jan 15, 2022
1 parent 6dfa669 commit 6ea366f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/molecules/MageList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const MageList = ({ mages }: Props) => (
{mages
.filter((m): m is Mage => !!m)
.map((mage, index) => (
<MageTile mage={mage} key={mage.name} playerNumber={index + 1} />
<MageTile mage={mage} key={mage.id} playerNumber={index + 1} />
))}
</Grid>
</MageGridWrapper>
Expand Down

0 comments on commit 6ea366f

Please sign in to comment.