diff options
| author | Jan Tuomi <jan.tuomi@eficode.com> | 2020-02-25 15:03:07 +0200 |
|---|---|---|
| committer | Jan Tuomi <jan.tuomi@eficode.com> | 2020-02-25 15:03:07 +0200 |
| commit | 0947b64287f7dd39310b7da10c7d8675c090b230 (patch) | |
| tree | cfcd69bbd2eb6a9fb7a674e548a08904fcd6a415 /frontend/src/Register.js | |
| parent | 72b5fc9357f0100f4cc560c1430f7ea2d849eb40 (diff) | |
yepmaster
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> |
