fix(wallet): improve mobile login and logout flows
This commit is contained in:
@@ -37,6 +37,24 @@ export function WalletButton({
|
||||
}, [open]);
|
||||
|
||||
if (wallet.status === "loggedIn" && wallet.address) {
|
||||
if (compact) {
|
||||
return (
|
||||
<div className="grid w-full gap-2">
|
||||
<div className="inline-flex h-10 w-full items-center justify-center rounded-full border border-ark-gold/45 bg-ark-gold/10 px-3 text-sm font-semibold text-ark-gold2">
|
||||
<span className="mr-2 h-2 w-2 rounded-full bg-emerald-400" />
|
||||
{shortenAddress(wallet.address)}
|
||||
</div>
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => wallet.logout()}
|
||||
className="h-10 w-full rounded-full border border-red-400/35 bg-red-500/10 px-4 text-sm font-semibold text-red-200 transition hover:bg-red-500/15"
|
||||
>
|
||||
{t("walletDisconnect")}
|
||||
</button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<div ref={rootRef} className="relative">
|
||||
<button
|
||||
|
||||
Reference in New Issue
Block a user