diff options
Diffstat (limited to 'frontend/src/Register.js')
| -rw-r--r-- | frontend/src/Register.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/frontend/src/Register.js b/frontend/src/Register.js index 97a5992..c2d7e98 100644 --- a/frontend/src/Register.js +++ b/frontend/src/Register.js @@ -18,7 +18,7 @@ const Register = () => { const { username } = resp.data; userState.authError = null; userState.username = username; - navigate('/'); + setData({ submitted: true }); } catch (err) { if (err.response && err.response.data) { setData({ @@ -31,6 +31,10 @@ const Register = () => { } }; + if (data.submitted) { + return <h1>You should be receiving an account activation email shortly.</h1>; + } + return ( <form onSubmit={handleSubmit(onSubmit)}> <h1 className="title">Register new account</h1> |
