@@ -3,7 +3,7 @@ import styled, { css } from "styled-components";
3
3
4
4
import { useLocation } from "react-router-dom" ;
5
5
import { useToggle } from "react-use" ;
6
- import { useAccount , useChainId } from "wagmi" ;
6
+ import { useAccount } from "wagmi" ;
7
7
8
8
import KlerosSolutionsIcon from "svgs/menu-icons/kleros-solutions.svg" ;
9
9
@@ -75,14 +75,14 @@ const StyledKlerosSolutionsIcon = styled(KlerosSolutionsIcon)`
75
75
fill: ${ ( { theme } ) => theme . white } !important;
76
76
` ;
77
77
78
- const ConnectWalletContainer = styled . div < { isConnected : boolean ; isCorrectChain : boolean } > `
78
+ const ConnectWalletContainer = styled . div < { isConnected : boolean ; isDefaultChain : boolean } > `
79
79
label {
80
80
color: ${ ( { theme } ) => theme . white } ;
81
81
}
82
82
83
- ${ ( { isConnected, isCorrectChain } ) =>
83
+ ${ ( { isConnected, isDefaultChain } ) =>
84
84
isConnected &&
85
- isCorrectChain &&
85
+ isDefaultChain &&
86
86
css `
87
87
cursor: pointer;
88
88
& > * {
@@ -108,9 +108,8 @@ const DesktopHeader: React.FC = () => {
108
108
const [ isOnboardingMiniGuidesOpen , toggleIsOnboardingMiniGuidesOpen ] = useToggle ( false ) ;
109
109
const [ initialTab , setInitialTab ] = useState < number > ( 0 ) ;
110
110
const location = useLocation ( ) ;
111
- const chainId = useChainId ( ) ;
112
- const { isConnected } = useAccount ( ) ;
113
- const isCorrectChain = chainId === DEFAULT_CHAIN ;
111
+ const { isConnected, chainId } = useAccount ( ) ;
112
+ const isDefaultChain = chainId === DEFAULT_CHAIN ;
114
113
115
114
const initializeFragmentURL = useCallback ( ( ) => {
116
115
const hash = location . hash ;
@@ -147,8 +146,8 @@ const DesktopHeader: React.FC = () => {
147
146
148
147
< RightSide >
149
148
< ConnectWalletContainer
150
- { ...{ isConnected, isCorrectChain } }
151
- onClick = { isConnected && isCorrectChain ? toggleIsSettingsOpen : undefined }
149
+ { ...{ isConnected, isDefaultChain } }
150
+ onClick = { isConnected && isDefaultChain ? toggleIsSettingsOpen : undefined }
152
151
>
153
152
< ConnectWallet />
154
153
</ ConnectWalletContainer >
0 commit comments