finished Protected Routes

This commit is contained in:
CodeServer
2022-03-11 08:45:17 +00:00
parent a20c839324
commit 686c8fe008
6 changed files with 87 additions and 7 deletions
+15
View File
@@ -0,0 +1,15 @@
import { createContext, useState } from "react";
const AuthContext = createContext({});
export const AuthProvider = ({ children }: {children: any}) => {
const [auth, setAuth] = useState({});
return (
<AuthContext.Provider value={{ auth, setAuth }}>
{children}
</AuthContext.Provider>
)
}
export default AuthContext;