Skip to content

Commit

Permalink
#LobbyDesign
Browse files Browse the repository at this point in the history
- Cleaned up the code for PR
  • Loading branch information
CheBato committed Dec 15, 2024
1 parent 62094b4 commit b2640fd
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ const GameCard: React.FC<IGameCardProps> = ({
const sideboardList = updatedDeck.sideboard || [];

// Helper function to move the card between lists
const moveCard = (sourceList: any[], targetList: any[]) => {
const cardIndex = sourceList.findIndex((c: any) => c.card.id === cardData.id);
const moveCard = (sourceList: IServerCardData[], targetList: IServerCardData[]) => {
const cardIndex = sourceList.findIndex((c: IServerCardData) => c.card.id === cardData.id);

if (cardIndex !== -1) {
// Decrement one copy from the source card
Expand All @@ -56,7 +56,7 @@ const GameCard: React.FC<IGameCardProps> = ({
}

// Now handle the target list
const existingCardIndex = targetList.findIndex((c: any) => c.card.id === cardData.id);
const existingCardIndex = targetList.findIndex((c: IServerCardData) => c.card.id === cardData.id);

if (existingCardIndex !== -1) {
// If the card already exists in the target, just increment its count
Expand Down

0 comments on commit b2640fd

Please sign in to comment.