Add AuthContext as a provider
This commit is contained in:
parent
6464316cb7
commit
1f39645265
|
@ -92,6 +92,7 @@ const signIn = ( email, password ) => {
|
|||
return (
|
||||
<div className="App">
|
||||
<Header items={nav} />
|
||||
<AuthContext.Provider>
|
||||
<Routes>
|
||||
<Route path="/" element={<Home greeting="Hey you're at home!" />} />
|
||||
<Route path="/about" element={<About greeting="Hey you, this is about page!" handler={saySomething} />} />
|
||||
|
@ -100,6 +101,7 @@ const signIn = ( email, password ) => {
|
|||
<Route path="/signout" element={ <Signout handler={logOut}/> } />
|
||||
<Route path="/signin" element={ <Signin handler={signIn} authstate={auth}/> } />
|
||||
</Routes>
|
||||
</AuthContext.Provider>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue