From 012e83a25c2ccfccf8c940a6249419c12852818a Mon Sep 17 00:00:00 2001 From: "web@ppanel" Date: Mon, 10 Feb 2025 22:51:31 +0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(third-party-accounts):=20Upd?= =?UTF-8?q?ate=20redirect=20property=20name=20in=20binding=20response=20ha?= =?UTF-8?q?ndling?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/(main)/(user)/profile/third-party-accounts.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/user/app/(main)/(user)/profile/third-party-accounts.tsx b/apps/user/app/(main)/(user)/profile/third-party-accounts.tsx index 2f31232..9c1ee08 100644 --- a/apps/user/app/(main)/(user)/profile/third-party-accounts.tsx +++ b/apps/user/app/(main)/(user)/profile/third-party-accounts.tsx @@ -220,7 +220,7 @@ export default function ThirdPartyAccounts() { method: account.id, redirect: `${window.location.origin}/bind/${account.id}`, }); - if (res.data?.data?.url) { + if (res.data?.data?.redirect) { window.location.href = res.data.data.redirect; } } @@ -246,8 +246,9 @@ export default function ThirdPartyAccounts() { break; case 'mobile': displayValue = - `${method?.area_code || ''}${method?.auth_identifier || ''}` || - t(`${account.id}.description`); + method?.area_code && method?.auth_identifier + ? `${method?.area_code || ''} ${method?.auth_identifier || ''}` + : t(`${account.id}.description`); break; default: displayValue = method?.auth_identifier || t(`${account.id}.description`);