Skip to content

Commit

Permalink
feat(rewards page): unsupported banner
Browse files Browse the repository at this point in the history
  • Loading branch information
solidovic committed Aug 21, 2024
1 parent 4f92fe4 commit 4efc5ad
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion features/rewards/features/top-card/top-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@ import { FC, useEffect, useState } from 'react';

import { StatsWrapper } from 'features/rewards/components/statsWrapper';
import { Stats } from 'features/rewards/components/stats';
import { useDappStatus } from 'shared/hooks/use-dapp-status';
import { Fallback } from 'shared/wallet';

import { Wallet } from './wallet';

export const TopCard: FC = () => {
const [visible, setVisible] = useState(false);
const { isWalletConnected, isSupportedChain } = useDappStatus();

// fix flash after reload page
useEffect(() => {
Expand All @@ -17,7 +20,8 @@ export const TopCard: FC = () => {

return (
<>
<Wallet />
{isWalletConnected && !isSupportedChain ? <Fallback /> : <Wallet />}

<StatsWrapper>
<Stats />
</StatsWrapper>
Expand Down

0 comments on commit 4efc5ad

Please sign in to comment.