Skip to content

Commit

Permalink
Merge pull request #262 from moonstream-to/roster-fix
Browse files Browse the repository at this point in the history
checking if selected token exists
  • Loading branch information
Anton-Mushnin authored Apr 22, 2024
2 parents d1fb714 + 1548088 commit a5f9113
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions web/src/components/tokens/Roster.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,20 @@ const Roster = ({ tokens }: { tokens: OwnedToken[] }) => {
<div className={styles.container}>
<div className={styles.header}>roster</div>
<div className={styles.tokens}>
<div className={styles.selectedTokenContainer}>
<Image src={tokens[selectedTokenIdx].image} alt={""} className={styles.bigTokenImage} />
<div className={styles.tokenInfo}>
<div className={styles.tokenName}>{tokens[selectedTokenIdx].name}</div>
<div className={styles.tokenId}>{tokens[selectedTokenIdx].id}</div>
{tokens[selectedTokenIdx] && (
<div className={styles.selectedTokenContainer}>
<Image src={tokens[selectedTokenIdx].image} alt={""} className={styles.bigTokenImage} />
<div className={styles.tokenInfo}>
<div className={styles.tokenName}>{tokens[selectedTokenIdx].name}</div>
<div className={styles.tokenId}>{tokens[selectedTokenIdx].id}</div>
</div>
{(selectedMode === 0 ||
(!!tokens[selectedTokenIdx].stakedSessionID &&
tokens[selectedTokenIdx].tokenProgress !== 6)) && (
<PlayButtons token={tokens[selectedTokenIdx]} />
)}
</div>
{(selectedMode === 0 ||
(!!tokens[selectedTokenIdx].stakedSessionID &&
tokens[selectedTokenIdx].tokenProgress !== 6)) && (
<PlayButtons token={tokens[selectedTokenIdx]} />
)}
</div>
)}
<div className={styles.tokenCards}>
{tokens.map((t, idx) => (
<Image
Expand Down

0 comments on commit a5f9113

Please sign in to comment.