Skip to content

Commit 4a7479e

Browse files
authored
Merge pull request #60279 from nkdengineer/fix/60250
fix: login - Email field is auto unfocused
2 parents c408101 + f6bf54d commit 4a7479e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/hooks/useAccountValidation.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ import ONYXKEYS from '@src/ONYXKEYS';
33

44
// TODO: Remove/Update this hook once we remove the user data and migrate to account data in https://github.com/Expensify/App/issues/59277
55
function useAccountValidation() {
6-
const [isAccountValidated] = useOnyx(ONYXKEYS.ACCOUNT, {selector: (account) => !!account?.validated});
7-
const [isUserValidated] = useOnyx(ONYXKEYS.USER, {selector: (user) => !!user?.validated});
6+
// Some places are using the current value to compare, so we shouldn't cast to boolean
7+
const [isAccountValidated] = useOnyx(ONYXKEYS.ACCOUNT, {selector: (account) => account?.validated});
8+
const [isUserValidated] = useOnyx(ONYXKEYS.USER, {selector: (user) => user?.validated});
89

910
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
1011
return isAccountValidated || isUserValidated;

0 commit comments

Comments
 (0)