Archived
finished Protected Routes
This commit is contained in:
@@ -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;
|
||||
Reference in New Issue
Block a user