Skip to content

Commit 5ddbc17

Browse files
authored
Make useAuthState accept a defualt user
1 parent 16d21b4 commit 5ddbc17

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

1313
useEffect(
1414
() => {

0 commit comments

Comments
 (0)