From c22a34a9065a2f10d6936027b887478bfbfbd299 Mon Sep 17 00:00:00 2001 From: Erica Mechler Date: Fri, 24 May 2024 11:30:40 +0200 Subject: [PATCH] fixed so that after a user registers, it comes to the signin-page automatically after 2 seconds --- frontend/src/components/Registration.jsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/frontend/src/components/Registration.jsx b/frontend/src/components/Registration.jsx index e1d13ab76..5a53a5021 100644 --- a/frontend/src/components/Registration.jsx +++ b/frontend/src/components/Registration.jsx @@ -32,6 +32,11 @@ export const Registration = ({ setIsRegistering }) => { setPassword(""); /* setIsRegistered(true); */ setIsLoading(false); + + // Redirect to the sign-in form after successful registration + setTimeout(() => { + setIsRegistering(false); + }, 2000); // Redirect after 2 seconds } else { setMessage(result.message || "Registration failed!"); }