Skip to content

Commit

Permalink
fix: show table for not connected wallet
Browse files Browse the repository at this point in the history
  • Loading branch information
solidovic committed Aug 20, 2024
1 parent c97270f commit 118e881
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { STRATEGY_LAZY } from 'consts/swr-strategies';
import { useRewardsHistory } from 'features/rewards/hooks';
import { ErrorBlockNoSteth } from 'features/rewards/components/errorBlocks/ErrorBlockNoSteth';
import { RewardsTable } from 'features/rewards/components/rewardsTable';
import { useDappStatus } from 'shared/hooks/use-dapp-status';

import { RewardsListsEmpty } from './RewardsListsEmpty';
import { RewardsListErrorMessage } from './RewardsListErrorMessage';
Expand All @@ -18,7 +17,6 @@ import {
} from './RewardsListContentStyles';

export const RewardsListContent: FC = () => {
const { isDappActive } = useDappStatus();
const {
error,
initialLoading,
Expand All @@ -32,8 +30,7 @@ export const RewardsListContent: FC = () => {
useSTETHBalance(STRATEGY_LAZY);
const hasSteth = stethBalance?.gt(Zero);

if (!isDappActive || (!data && !initialLoading && !error))
return <RewardsListsEmpty />;
if (!data && !initialLoading && !error) return <RewardsListsEmpty />;
// showing loading when canceling requests and empty response
if (
(!data && !error) ||
Expand Down

0 comments on commit 118e881

Please sign in to comment.