From 154808836d038af77fc53867a58f49482cd4c089 Mon Sep 17 00:00:00 2001 From: Anton Mushnin Date: Mon, 22 Apr 2024 18:00:37 +0300 Subject: [PATCH] checking if selected token exists --- web/src/components/tokens/Roster.tsx | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/web/src/components/tokens/Roster.tsx b/web/src/components/tokens/Roster.tsx index 4e3f4722..6bf7f2a1 100644 --- a/web/src/components/tokens/Roster.tsx +++ b/web/src/components/tokens/Roster.tsx @@ -16,18 +16,20 @@ const Roster = ({ tokens }: { tokens: OwnedToken[] }) => {
roster
-
- {""} -
-
{tokens[selectedTokenIdx].name}
-
{tokens[selectedTokenIdx].id}
+ {tokens[selectedTokenIdx] && ( +
+ {""} +
+
{tokens[selectedTokenIdx].name}
+
{tokens[selectedTokenIdx].id}
+
+ {(selectedMode === 0 || + (!!tokens[selectedTokenIdx].stakedSessionID && + tokens[selectedTokenIdx].tokenProgress !== 6)) && ( + + )}
- {(selectedMode === 0 || - (!!tokens[selectedTokenIdx].stakedSessionID && - tokens[selectedTokenIdx].tokenProgress !== 6)) && ( - - )} -
+ )}
{tokens.map((t, idx) => (