Skip to content

Commit

Permalink
fixed issue where the deck loading indicator disappeared preemptively
Browse files Browse the repository at this point in the history
  • Loading branch information
eviterin committed Mar 16, 2024
1 parent d112e58 commit 59e800c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/webapp/src/components/collection/deckList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,11 @@ const DeckCollectionDisplay: React.FC<DeckCollectionDisplayProps> = ({ onDeckSel
if (!response.simulatedResult) return
const receivedDecks = response.simulatedResult as string[]
setDeckNames(receivedDecks)
setIsLoadingDecks(false)
})
.catch((error) => {
console.error("Error fetching decks:", error)
})
.finally(() => {
setIsLoadingDecks(false)
})
}
}, [playerAddress])

Expand All @@ -52,6 +50,7 @@ const DeckCollectionDisplay: React.FC<DeckCollectionDisplayProps> = ({ onDeckSel
{/* Loading Button */}
{isLoadingDecks && (
<Button
variant={"secondary"}
width="full"
className="my-2 border-2 border-yellow-500 font-fable text-xl normal-case hover:scale-105 hover:border-yellow-400"
disabled={true}
Expand Down

0 comments on commit 59e800c

Please sign in to comment.