improvement: hide some elements base on user profile

This commit is contained in:
canove
2021-01-14 06:55:44 -03:00
parent 3bb63a25da
commit b2438c4fdf
8 changed files with 83 additions and 36 deletions

View File

@@ -5,11 +5,18 @@ import useAuth from "./useAuth";
const AuthContext = createContext();
const AuthProvider = ({ children }) => {
const { loading, user, isAuth, handleLogin, handleLogout } = useAuth();
const {
loading,
user,
setUser,
isAuth,
handleLogin,
handleLogout,
} = useAuth();
return (
<AuthContext.Provider
value={{ loading, user, isAuth, handleLogin, handleLogout }}
value={{ loading, user, setUser, isAuth, handleLogin, handleLogout }}
>
{children}
</AuthContext.Provider>