File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
src/components/EmptyState Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change 44 CardFooter ,
55 CardHeader ,
66} from '@oasisprotocol/ui-library/src/components/ui/card' ;
7+ import { useAccount } from 'wagmi' ;
78
89interface EmptyStateProps {
910 title : string ;
@@ -12,16 +13,22 @@ interface EmptyStateProps {
1213}
1314
1415export function EmptyState ( { title, description, children } : EmptyStateProps ) {
16+ const { isConnected } = useAccount ( ) ;
17+
1518 return (
1619 < Card className = "h-full rounded-md border-0 flex justify-center p-8 gap-2" >
1720 < CardHeader className = "text-xl font-semibold text-white text-center" >
18- { title }
21+ { isConnected ? title : 'Connect is not connected' }
1922 </ CardHeader >
2023 < CardContent className = "max-w-[60%] mx-auto text-gray-400 text-sm text-balance text-center leading-relaxed" >
21- { description }
24+ { isConnected
25+ ? description
26+ : 'Please connect your wallet to to gain access to the view.' }
2227 </ CardContent >
2328
24- < CardFooter className = "flex justify-center pt-2" > { children } </ CardFooter >
29+ < CardFooter className = "flex justify-center pt-2" >
30+ { isConnected ? children : null }
31+ </ CardFooter >
2532 </ Card >
2633 ) ;
2734}
You can’t perform that action at this time.
0 commit comments