Skip to content

Commit 363a558

Browse files
authored
Set useAuthState to use by default the auth().currentUser
1 parent 5ddbc17 commit 363a558

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

auth/useAuthState.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ export type AuthStateHook = {
77
initialising: boolean;
88
};
99

10-
export default (auth: auth.Auth, defaultUser?: User = undefined): AuthStateHook => {
11-
const { loading, setValue, value } = useLoadingValue<User>(defaultUser);
10+
export default (auth: auth.Auth): AuthStateHook => {
11+
const { loading, setValue, value } = useLoadingValue<User>(auth().currentUser);
1212

1313
useEffect(
1414
() => {

0 commit comments

Comments
 (0)