more
This commit is contained in:
@@ -33,13 +33,15 @@ export const AuthProvider = ({ children }) => {
|
||||
|
||||
|
||||
const value = {
|
||||
user: state.name,
|
||||
user: state.tier
|
||||
authUser: state.name,
|
||||
authUserTier: state.tier,
|
||||
addAuthUser,
|
||||
logoutAuthUser
|
||||
};
|
||||
return <AuthContext.Provider value={value}>{children}</AuthContext.Provider>;
|
||||
};
|
||||
|
||||
const useAuthContext = () => {
|
||||
const useAuth = () => {
|
||||
const context = useContext(ShopContext);
|
||||
|
||||
if (context === undefined) {
|
||||
@@ -49,4 +51,4 @@ const useAuthContext = () => {
|
||||
return context;
|
||||
};
|
||||
|
||||
export default useAuthContext;
|
||||
export default useAuth;
|
||||
|
||||
Reference in New Issue
Block a user