Add Redirect to homepage from signup

This commit is contained in:
Ray 2023-09-19 11:06:46 +00:00 committed by GitHub
parent 892df52755
commit ed5cf0454c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -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} />} />

View File

@ -27,6 +27,7 @@ export function Signup ( props ) {
useEffect( () => {
if( auth ) {
// go to home page
console.log(auth)
navigate("/")
}
}, [auth])