From 02e75ea5cdb30a5d1085e59f5a36bd7edded6922 Mon Sep 17 00:00:00 2001 From: Gala Date: Fri, 16 Sep 2022 12:24:32 +0200 Subject: [PATCH] display different content when user doesn't have delegations --- nym-wallet/src/pages/delegation/index.tsx | 92 ++++++++++++++++------- 1 file changed, 65 insertions(+), 27 deletions(-) diff --git a/nym-wallet/src/pages/delegation/index.tsx b/nym-wallet/src/pages/delegation/index.tsx index 15cbdbe75f..090ae1bf3a 100644 --- a/nym-wallet/src/pages/delegation/index.tsx +++ b/nym-wallet/src/pages/delegation/index.tsx @@ -1,5 +1,5 @@ import React, { FC, useContext, useEffect, useState } from 'react'; -import { Box, Button, Paper, Stack, Typography } from '@mui/material'; +import { Box, Button, Paper, Stack, Typography, CircularProgress } from '@mui/material'; import { useTheme, Theme } from '@mui/material/styles'; import { DelegationWithEverything, FeeDetails, DecCoin } from '@nymproject/types'; import { Link } from '@nymproject/react/link/Link'; @@ -290,33 +290,71 @@ export const Delegation: FC<{ isStorybook?: boolean }> = ({ isStorybook }) => { Delegations - + )} + + + {!!delegations?.length && ( + + + + + + )} + + {delegations?.length ? ( + - - - - - - + ) : isLoading ? ( + + + + ) : ( + + + Checkout the{' '} + {' '} + for performance and other parameters to help make delegation decisions. Hint: In Nym explorer use + advanced filters to precisely define what node you are looking for. + + + + )}