Skip to content
Permalink
Browse files

bugfix DeckList sorting in react (#740)

  • Loading branch information
lusbenjamin authored and Manuel-777 committed Nov 21, 2019
1 parent b1559b0 commit d2fb6387d7cf5a651dc7d89e2828f0085cc0ef55
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/overlay/DeckList.tsx
@@ -159,7 +159,7 @@ export default function DeckList(props: DeckListProps): JSX.Element {
mainCards.add(groupedLandsCard, landsNumber, true);
}
mainCards.get().sort(sortFunc);
mainCards.get().forEach((card: any) => {
mainCards.get().forEach((card: any, index: number) => {
let quantity = card.quantity;
if (settings.mode === OVERLAY_MIXED) {
const odds = (card.chance !== undefined ? card.chance : "0") + "%";
@@ -196,7 +196,7 @@ export default function DeckList(props: DeckListProps): JSX.Element {
mainCardTiles.push(
<div
className="overlay_card_quantity"
key={"maincardtile_owned_" + card.id}
key={"maincardtile_owned_" + index + "_" + card.id}
>
<OwnershipStars card={fullCard} />
</div>
@@ -232,7 +232,7 @@ export default function DeckList(props: DeckListProps): JSX.Element {
const sideCards = deckClone.sideboard;
sideCards.removeDuplicates();
sideCards.get().sort(sortFunc);
sideCards.get().forEach((card: any) => {
sideCards.get().forEach((card: any, index: number) => {
const quantity =
settings.mode === OVERLAY_ODDS || settings.mode === OVERLAY_MIXED
? "0%"
@@ -250,7 +250,7 @@ export default function DeckList(props: DeckListProps): JSX.Element {
style={tileStyle}
card={fullCard}
dfcCard={dfcCard}
key={"sideboardcardtile_" + card.id}
key={"sideboardcardtile_" + index + "_" + card.id}
indent="a"
isSideboard={true}
quantity={quantity}

0 comments on commit d2fb638

Please sign in to comment.
You can’t perform that action at this time.