Add Redirect to homepage from signup
This commit is contained in:
parent
892df52755
commit
ed5cf0454c
|
@ -92,7 +92,7 @@ const signIn = ( email, password ) => {
|
||||||
return (
|
return (
|
||||||
<div className="App">
|
<div className="App">
|
||||||
<Header items={nav} />
|
<Header items={nav} />
|
||||||
<AuthContext.Provider>
|
<AuthContext.Provider value={auth}>
|
||||||
<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} />} />
|
||||||
|
|
|
@ -27,6 +27,7 @@ export function Signup ( props ) {
|
||||||
useEffect( () => {
|
useEffect( () => {
|
||||||
if( auth ) {
|
if( auth ) {
|
||||||
// go to home page
|
// go to home page
|
||||||
|
console.log(auth)
|
||||||
navigate("/")
|
navigate("/")
|
||||||
}
|
}
|
||||||
}, [auth])
|
}, [auth])
|
||||||
|
|
Loading…
Reference in New Issue