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