@@ -13,7 +13,6 @@ import { responsiveSize } from "styles/responsiveSize";
13
13
14
14
import ConnectWallet from "components/ConnectWallet" ;
15
15
import LightButton from "components/LightButton" ;
16
- import { Overlay } from "components/Overlay" ;
17
16
import Onboarding from "components/Popup/MiniGuides/Onboarding" ;
18
17
19
18
import Logo from "./Logo" ;
@@ -22,6 +21,7 @@ import Explore from "./navbar/Explore";
22
21
import Menu from "./navbar/Menu" ;
23
22
import Help from "./navbar/Menu/Help" ;
24
23
import Settings from "./navbar/Menu/Settings" ;
24
+ import { useAccount } from "wagmi" ;
25
25
26
26
const Container = styled . div `
27
27
display: none;
@@ -73,10 +73,19 @@ const StyledKlerosSolutionsIcon = styled(KlerosSolutionsIcon)`
73
73
fill: ${ ( { theme } ) => theme . white } !important;
74
74
` ;
75
75
76
- const ConnectWalletContainer = styled . div `
76
+ const ConnectWalletContainer = styled . div < { isConnected : boolean } > `
77
77
label {
78
78
color: ${ ( { theme } ) => theme . white } ;
79
79
}
80
+
81
+ ${ ( { isConnected } ) =>
82
+ isConnected &&
83
+ css `
84
+ cursor: pointer;
85
+ & > * {
86
+ pointer-events: none;
87
+ }
88
+ ` }
80
89
` ;
81
90
82
91
const PopupContainer = styled . div `
@@ -85,7 +94,8 @@ const PopupContainer = styled.div`
85
94
left: 0;
86
95
width: 100%;
87
96
height: 100%;
88
- z-index: 30;
97
+ z-index: 1;
98
+ background-color: ${ ( { theme } ) => theme . blackLowOpacity } ;
89
99
` ;
90
100
91
101
const DesktopHeader : React . FC = ( ) => {
@@ -95,6 +105,7 @@ const DesktopHeader: React.FC = () => {
95
105
const [ isOnboardingMiniGuidesOpen , toggleIsOnboardingMiniGuidesOpen ] = useToggle ( false ) ;
96
106
const [ initialTab , setInitialTab ] = useState < number > ( 0 ) ;
97
107
const location = useLocation ( ) ;
108
+ const { isConnected } = useAccount ( ) ;
98
109
99
110
const initializeFragmentURL = useCallback ( ( ) => {
100
111
const hash = location . hash ;
@@ -130,15 +141,14 @@ const DesktopHeader: React.FC = () => {
130
141
</ MiddleSide >
131
142
132
143
< RightSide >
133
- < ConnectWalletContainer >
144
+ < ConnectWalletContainer isConnected = { isConnected } onClick = { isConnected ? toggleIsSettingsOpen : undefined } >
134
145
< ConnectWallet />
135
146
</ ConnectWalletContainer >
136
147
< Menu { ...{ toggleIsHelpOpen, toggleIsSettingsOpen } } />
137
148
</ RightSide >
138
149
</ Container >
139
150
{ ( isDappListOpen || isHelpOpen || isSettingsOpen ) && (
140
151
< PopupContainer >
141
- < Overlay />
142
152
{ isDappListOpen && < DappList { ...{ toggleIsDappListOpen, isDappListOpen } } /> }
143
153
{ isHelpOpen && < Help { ...{ toggleIsHelpOpen, isHelpOpen } } /> }
144
154
{ isSettingsOpen && < Settings { ...{ toggleIsSettingsOpen, isSettingsOpen, initialTab } } /> }
0 commit comments