From 7cb5c2a224d974fb69c415dca937fdf15fdebe5f Mon Sep 17 00:00:00 2001 From: Cedric Rische Date: Wed, 15 Jan 2025 13:32:26 +0100 Subject: [PATCH] Added console log on failure --- src/components/Registration/Registration.jsx | 60 ++++++++++---------- 1 file changed, 31 insertions(+), 29 deletions(-) diff --git a/src/components/Registration/Registration.jsx b/src/components/Registration/Registration.jsx index d45dbc1..c6ea297 100644 --- a/src/components/Registration/Registration.jsx +++ b/src/components/Registration/Registration.jsx @@ -211,7 +211,9 @@ const legal = [ }, { formLabel: "Recruiting", - input: ["I agree that my contact and job-related data may be passed on to participating recruiters (sponsors)"], + input: [ + "I agree that my contact and job-related data may be passed on to participating recruiters (sponsors)", + ], name: "recruiters", type: 5, required: false, @@ -228,15 +230,12 @@ const legal = [ }, ]; - function Registration() { const [activeStep, setActiveStep] = React.useState(0); const [values, setValues] = useState({}); const [isSending, setIsSending] = useState(false); const registrationRest = useMemo(() => new RegistrationRest(), []); - - const steps = [ { label: "Personal data", @@ -252,7 +251,12 @@ function Registration() { }, { label: "Team members", - children: handleChange("group", change)} />, + children: ( + handleChange("group", change)} + /> + ), }, { label: "Confirmation", @@ -261,24 +265,24 @@ function Registration() { { label: "E-Mail Verification", children: ( - - - - - To complete the registration, please click on the link in the email - we sent you! - - - + + + + + To complete the registration, please click on the link in the + email we sent you! + + + ), }, ]; @@ -466,9 +470,10 @@ function Registration() { setIsSending(false); handleNext(); }) - .catch(() => { + .catch((error) => { alert( - "Could not save Registration. Did you already submit? Please check your spam folder for verification mail.", + "Could not save Registration. Please try again. If problem persists, please contact team@hackhpi.org. Error: " + + JSON.stringify(error.data), ); setIsSending(false); }); @@ -586,10 +591,7 @@ function Registration() { ))} - + Read our{" "} privacy policy