fix: Property 'service' is missing in type '{}' but required in type 'AuthContextProps'

This commit is contained in:
chenos 2021-08-23 21:55:17 +08:00
parent c82fee6162
commit dd769e4d04

View File

@ -11,7 +11,7 @@ export interface AuthContextProps {
service: BaseResult<any, any>;
}
export const AuthContext = createContext<AuthContextProps>({});
export const AuthContext = createContext<AuthContextProps>(null);
export const useCurrentUser = () => {
const { currentUser } = useContext(AuthContext);