fix: hide imtoken on desktop wallet login
Some checks failed
Deploy Staging (terry-wallet-login) / deploy (push) Failing after 30s
Some checks failed
Deploy Staging (terry-wallet-login) / deploy (push) Failing after 30s
This commit is contained in:
@@ -53,7 +53,7 @@ export function WalletLoginModal() {
|
||||
const { t } = useI18n();
|
||||
const { closeLoginModal, completeLogin, loginModalOpen } = useWallet();
|
||||
const [selected, setSelected] = useState<WalletKind | null>(null);
|
||||
const [mobileDevice, setMobileDevice] = useState(false);
|
||||
const [mobileDevice, setMobileDevice] = useState(() => isMobileDevice());
|
||||
const [state, setState] = useState<LoginState>("idle");
|
||||
const [error, setError] = useState("");
|
||||
const [pendingLogin, setPendingLogin] = useState<PendingLogin | null>(null);
|
||||
@@ -74,6 +74,9 @@ export function WalletLoginModal() {
|
||||
t(key).replaceAll("{wallet}", walletName(kind));
|
||||
const walletHint = () =>
|
||||
mobileDevice ? t("walletChooseMobile") : t("walletDesktopHint");
|
||||
const visibleWallets = mobileDevice
|
||||
? wallets
|
||||
: wallets.filter(supportsDesktopExtension);
|
||||
const busy = state !== "idle";
|
||||
|
||||
const close = () => {
|
||||
@@ -179,7 +182,7 @@ export function WalletLoginModal() {
|
||||
</div>
|
||||
|
||||
<div className="mt-5 grid gap-2">
|
||||
{wallets.map((kind) => {
|
||||
{visibleWallets.map((kind) => {
|
||||
const active = selected === kind;
|
||||
const connecting = active && state === "connecting";
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user