fix: redirect to history page after register to avoid problems

With the previous redirect to the root page, there were some problems when having no other routes in the route history.

Signed-off-by: Erik Michelson <github@erik.michelson.eu>
This commit is contained in:
Erik Michelson 2023-10-07 16:55:14 +02:00 committed by Philip Molares
parent f47f6c3658
commit cd68794157

View file

@ -49,7 +49,7 @@ export const LocalRegisterForm: NextPage = () => {
doLocalRegister(username, displayName, password)
.then(() => fetchAndSetUser())
.then(() => dispatchUiNotification('login.register.success.title', 'login.register.success.message', {}))
.then(() => router.push('/'))
.then(() => router.push('/history'))
.catch((error: ApiError) => setError(error))
event.preventDefault()
},