🗂Better folder structure on frontend

This commit is contained in:
canove
2020-07-25 10:49:39 -03:00
parent a543dd31ae
commit 660458a8ab
29 changed files with 38 additions and 41 deletions

View File

@@ -0,0 +1,19 @@
import React, { createContext } from "react";
import useAuth from "./useAuth";
const AuthContext = createContext();
const AuthProvider = ({ children }) => {
const { isAuth, loading, handleLogin, handleLogout } = useAuth();
return (
<AuthContext.Provider
value={{ loading, isAuth, handleLogin, handleLogout }}
>
{children}
</AuthContext.Provider>
);
};
export { AuthContext, AuthProvider };