mirror of
https://github.com/cheveguerra/whaticket-community.git
synced 2026-04-19 04:09:26 +00:00
improvement: hide some elements base on user profile
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user