Skip to content

Commit

Permalink
@thunderstore/cyberstorm: use unique key props in PackageList
Browse files Browse the repository at this point in the history
Same package name can be in use in different namespaces, which caused
React to sometimes render PackageCards from old result sets in addition
to the current ones when the filters were used.

Refs TS-1875
  • Loading branch information
anttimaki committed Nov 9, 2023
1 parent 9a54079 commit 7b794d6
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export function PackageList(props: Props) {

<div className={styles.packages}>
{packages.results.map((p) => (
<PackageCard key={p.name} package={p} />
<PackageCard key={`${p.namespace}-${p.name}`} package={p} />
))}
</div>

Expand Down

0 comments on commit 7b794d6

Please sign in to comment.