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";
66
77const Container = styled . div `
88 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;
1312` ;
1413
1514const AccountContainer = styled . div `
Original file line number Diff line number Diff line change 11import React from "react" ;
2+ import styled from "styled-components" ;
23import { useAccount , useNetwork , useSwitchNetwork } from "wagmi" ;
34import { useWeb3Modal } from "@web3modal/react" ;
45import { Button } from "@kleros/ui-components-library" ;
56import { SUPPORTED_CHAINS , DEFAULT_CHAIN } from "consts/chains" ;
67import 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+ ` ;
716
817export const SwitchChainButton : React . FC = ( ) => {
918 const { switchNetwork, isLoading } = useSwitchNetwork ( ) ;
@@ -39,7 +48,13 @@ const ConnectWallet: React.FC = () => {
3948 if ( isConnected ) {
4049 if ( chain && chain . id !== DEFAULT_CHAIN ) {
4150 return < SwitchChainButton /> ;
42- } else return < AccountDisplay /> ;
51+ } else
52+ return (
53+ < Container >
54+ < AccountDisplay />
55+ < DisconnectWalletButton />
56+ </ Container >
57+ ) ;
4358 } else return < ConnectButton /> ;
4459} ;
4560
You can’t perform that action at this time.
0 commit comments