File tree Expand file tree Collapse file tree 2 files changed +19
-5
lines changed
web/src/components/ConnectWallet Expand file tree Collapse file tree 2 files changed +19
-5
lines changed Original file line number Diff line number Diff line change @@ -6,10 +6,9 @@ import { shortenAddress } from "utils/shortenAddress";
6
6
7
7
const Container = styled . div `
8
8
display: flex;
9
- flex-direction: row;
10
- justify-content: space-between;
11
- align-content: center;
12
- align-items: center;
9
+ flex-direction: column;
10
+ align-items: flex-start;
11
+ gap: 8px;
13
12
` ;
14
13
15
14
const AccountContainer = styled . div `
Original file line number Diff line number Diff line change 1
1
import React from "react" ;
2
+ import styled from "styled-components" ;
2
3
import { useAccount , useNetwork , useSwitchNetwork } from "wagmi" ;
3
4
import { useWeb3Modal } from "@web3modal/react" ;
4
5
import { Button } from "@kleros/ui-components-library" ;
5
6
import { SUPPORTED_CHAINS , DEFAULT_CHAIN } from "consts/chains" ;
6
7
import AccountDisplay from "./AccountDisplay" ;
8
+ import { DisconnectWalletButton } from "layout/Header/navbar/Menu/Settings/General" ;
9
+
10
+ const Container = styled . div `
11
+ display: flex;
12
+ gap: 16px;
13
+ justify-content: space-between;
14
+ flex-wrap: wrap;
15
+ ` ;
7
16
8
17
export const SwitchChainButton : React . FC = ( ) => {
9
18
const { switchNetwork, isLoading } = useSwitchNetwork ( ) ;
@@ -39,7 +48,13 @@ const ConnectWallet: React.FC = () => {
39
48
if ( isConnected ) {
40
49
if ( chain && chain . id !== DEFAULT_CHAIN ) {
41
50
return < SwitchChainButton /> ;
42
- } else return < AccountDisplay /> ;
51
+ } else
52
+ return (
53
+ < Container >
54
+ < AccountDisplay />
55
+ < DisconnectWalletButton />
56
+ </ Container >
57
+ ) ;
43
58
} else return < ConnectButton /> ;
44
59
} ;
45
60
You can’t perform that action at this time.
0 commit comments