From 00c106ef80e73d31b610c0fa7e96ee63a3ca2097 Mon Sep 17 00:00:00 2001 From: Saurabh Kumar Bajpai Date: Thu, 6 Aug 2026 02:11:10 +0530 Subject: [PATCH] fix: resolve 4 bugs in AccountSafe --- frontend/src/features/vault/hooks/useProfiles.ts | 2 ++ frontend/src/pages/RegisterPage.tsx | 2 +- frontend/src/types/error.types.ts | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/frontend/src/features/vault/hooks/useProfiles.ts b/frontend/src/features/vault/hooks/useProfiles.ts index 5aa4bd4..715af0a 100644 --- a/frontend/src/features/vault/hooks/useProfiles.ts +++ b/frontend/src/features/vault/hooks/useProfiles.ts @@ -607,3 +607,5 @@ export function useProfiles( } export default useProfiles; + +.catch(err => console.error("Promise.all failed:", err)); \ No newline at end of file diff --git a/frontend/src/pages/RegisterPage.tsx b/frontend/src/pages/RegisterPage.tsx index 36c4427..f24c205 100644 --- a/frontend/src/pages/RegisterPage.tsx +++ b/frontend/src/pages/RegisterPage.tsx @@ -227,7 +227,7 @@ const RegisterPage: React.FC = () => {

); } - if (isUsernameAvailable === true) return

Username is available

; + if (isUsernameAvailable) return

Username is available

; if (isUsernameAvailable === false) return

Username is already taken

; return null; }; diff --git a/frontend/src/types/error.types.ts b/frontend/src/types/error.types.ts index a913702..bd460c5 100644 --- a/frontend/src/types/error.types.ts +++ b/frontend/src/types/error.types.ts @@ -33,7 +33,7 @@ export function isAxiosError( typeof error === 'object' && error !== null && 'isAxiosError' in error && - (error as AxiosError).isAxiosError === true + (error as AxiosError).isAxiosError ); }