From 3b89077ae409ed8da13494074925adccc12bf44e Mon Sep 17 00:00:00 2001
From: Tore Brede <Tore.Brede@uib.no>
Date: Tue, 11 Jan 2022 12:11:03 +0100
Subject: [PATCH] Going back to invite page on cancel

---
 frontend/src/routes/guest/register/index.tsx | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/frontend/src/routes/guest/register/index.tsx b/frontend/src/routes/guest/register/index.tsx
index 7b419965..53d0821d 100644
--- a/frontend/src/routes/guest/register/index.tsx
+++ b/frontend/src/routes/guest/register/index.tsx
@@ -353,7 +353,10 @@ export default function GuestRegister() {
   }
 
   const handleCancel = () => {
-    history.push('/')
+    // Go back to the invite page. The invitation ID does not need
+    // to be specified here, since the user has already been
+    // logged in and can be identified without the invitation ID
+    history.push('/invite')
   }
 
   return (
-- 
GitLab