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