From 05c2252b49481d494c033e40d6579e5ea79daa8f Mon Sep 17 00:00:00 2001 From: TerryM Date: Tue, 2 Jun 2026 00:45:58 +0800 Subject: [PATCH] fix: close mobile menu before wallet login --- src/layouts/PublicLayout.tsx | 2 +- src/wallet/WalletButton.tsx | 13 +++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/layouts/PublicLayout.tsx b/src/layouts/PublicLayout.tsx index dfa375e..febd2fd 100644 --- a/src/layouts/PublicLayout.tsx +++ b/src/layouts/PublicLayout.tsx @@ -723,7 +723,7 @@ export function PublicLayout() { {t("popular")}
- + setOpen(false)} />
) : null} diff --git a/src/wallet/WalletButton.tsx b/src/wallet/WalletButton.tsx index 26061c3..d75f94f 100644 --- a/src/wallet/WalletButton.tsx +++ b/src/wallet/WalletButton.tsx @@ -2,7 +2,13 @@ import { useEffect, useRef, useState } from "react"; import { useI18n } from "../i18n"; import { shortenAddress, useWallet } from "./WalletProvider"; -export function WalletButton({ compact = false }: { compact?: boolean }) { +export function WalletButton({ + compact = false, + onOpenLogin, +}: { + compact?: boolean; + onOpenLogin?: () => void; +}) { const { t } = useI18n(); const wallet = useWallet(); const [open, setOpen] = useState(false); @@ -66,7 +72,10 @@ export function WalletButton({ compact = false }: { compact?: boolean }) { return (