File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
packages/web-wallet/src/pages Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ const Home: React.FC = () => {
10
10
const navigate = useNavigate ( ) ;
11
11
const { state } = useWebZjsContext ( ) ;
12
12
const { getAccountData, connectWebZjsSnap } = useWebZjsActions ( ) ;
13
- const { installedSnap, isFlask } = useMetaMask ( ) ;
13
+ const { installedSnap } = useMetaMask ( ) ;
14
14
const { getSnapState } = useGetSnapState ( ) ;
15
15
const { setSnapState } = useMetaMaskContext ( ) ;
16
16
@@ -51,11 +51,17 @@ const Home: React.FC = () => {
51
51
Access the Zcash network from your web browser with the Zcash
52
52
MetaMask Snap
53
53
</ p >
54
+ { ! ! installedSnap && (
55
+ < div className = "bg-yellow-100 border border-yellow-400 text-yellow-700 px-4 py-3 rounded-xl" >
56
+ Make sure you MetaMask is unlocked to continue
57
+ </ div >
58
+ ) }
54
59
< button
60
+ disabled = { ! ! installedSnap }
55
61
onClick = { handleConnectButton }
56
- className = " flex items-center bg-button-black-gradient hover:bg-button-black-gradient-hover text-white px-6 py-3 rounded-[2rem] cursor-pointer"
62
+ className = { ` flex items-center bg-button-black-gradient hover:bg-button-black-gradient-hover text-white px-6 py-3 rounded-[2rem] ${ ! ! installedSnap ? ' cursor-not-allowed' : 'cursor- pointer' } ` }
57
63
>
58
- < span > Connect MetaMask Snap</ span >
64
+ < span > { ! ! installedSnap ? 'Loading Web Wallet...' : ' Connect MetaMask Snap' } </ span >
59
65
< div className = "ml-3" >
60
66
< img
61
67
src = { MetaMaskLogoPNG }
You can’t perform that action at this time.
0 commit comments