From 4efc5ad72728f3adfcf98543e8bcaef2f0e9736c Mon Sep 17 00:00:00 2001 From: Anton Shalimov Date: Wed, 21 Aug 2024 13:35:27 +0300 Subject: [PATCH] feat(rewards page): unsupported banner --- features/rewards/features/top-card/top-card.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/features/rewards/features/top-card/top-card.tsx b/features/rewards/features/top-card/top-card.tsx index 9ae2f7ef9..2e44058a5 100644 --- a/features/rewards/features/top-card/top-card.tsx +++ b/features/rewards/features/top-card/top-card.tsx @@ -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(() => { @@ -17,7 +20,8 @@ export const TopCard: FC = () => { return ( <> - + {isWalletConnected && !isSupportedChain ? : } +