@@ -8,27 +8,38 @@ import { TextButton } from '@app/styles/button.styles';
8
8
import { useWalletProvider } from '@app/hooks/use-wallet-provider' ;
9
9
10
10
const Banner = styled ( StyledHeaderPanel ) `
11
- position: relative ;
12
- top : 0;
11
+ position: fixed ;
12
+ bottom : 0;
13
13
width: 100%;
14
- background-color: #f9f9f9;
14
+ background-color: rgba(249, 249, 249, 0.8);
15
+ backdrop-filter: blur(10px);
15
16
z-index: 9999;
16
17
display: flex;
17
18
justify-content: center;
18
19
align-items: center;
19
20
padding: 20px 0;
20
- border-top: 0px ;
21
+ border-top: 3px solid black ;
21
22
border-left: 0px;
22
23
border-right: 0px;
23
- border-top-left-radius: 0;
24
- border-top-right-radius: 0;
24
+ border-bottom: 0px;
25
+ border-bottom-left-radius: 0;
26
+ border-bottom-right-radius: 0;
25
27
` ;
26
28
27
29
const Text = styled . p `
28
30
margin: 0;
29
31
padding-right: 20px;
30
32
` ;
31
33
34
+ const CloseButton = styled . button `
35
+ position: absolute;
36
+ right: 20px;
37
+ background: none;
38
+ border: none;
39
+ font-size: 20px;
40
+ cursor: pointer;
41
+ ` ;
42
+
32
43
export interface WalletContextValue {
33
44
provider ?: WalletProvider ;
34
45
}
@@ -39,6 +50,10 @@ export const NetworkPanel = () => {
39
50
const [ shouldRender , setShouldRender ] = useState < boolean > ( true ) ;
40
51
const { provider } = useWalletProvider ( ) ;
41
52
53
+ const closeBanner = ( ) => {
54
+ setShouldRender ( false ) ;
55
+ } ;
56
+
42
57
const checkNetwork = useCallback ( async ( ) => {
43
58
if ( provider ?. method . toLowerCase ( ) !== 'metamask' ) {
44
59
setShouldRender ( false ) ;
@@ -169,6 +184,7 @@ export const NetworkPanel = () => {
169
184
You need to switch to the < b > { config ?. networkName } </ b > network in MetaMask
170
185
</ Text >
171
186
< TextButton onClick = { switchNetwork } > Switch Network</ TextButton >
187
+ < CloseButton onClick = { closeBanner } > x</ CloseButton >
172
188
</ Banner >
173
189
) ;
174
190
} ;
0 commit comments