Skip to content

Commit 7cb5c2a

Browse files
committed
Added console log on failure
1 parent acf4215 commit 7cb5c2a

File tree

1 file changed

+31
-29
lines changed

1 file changed

+31
-29
lines changed

src/components/Registration/Registration.jsx

Lines changed: 31 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,9 @@ const legal = [
211211
},
212212
{
213213
formLabel: "Recruiting",
214-
input: ["I agree that my contact and job-related data may be passed on to participating recruiters (sponsors)"],
214+
input: [
215+
"I agree that my contact and job-related data may be passed on to participating recruiters (sponsors)",
216+
],
215217
name: "recruiters",
216218
type: 5,
217219
required: false,
@@ -228,15 +230,12 @@ const legal = [
228230
},
229231
];
230232

231-
232233
function Registration() {
233234
const [activeStep, setActiveStep] = React.useState(0);
234235
const [values, setValues] = useState({});
235236
const [isSending, setIsSending] = useState(false);
236237
const registrationRest = useMemo(() => new RegistrationRest(), []);
237238

238-
239-
240239
const steps = [
241240
{
242241
label: "Personal data",
@@ -252,7 +251,12 @@ function Registration() {
252251
},
253252
{
254253
label: "Team members",
255-
children: <GroupManager eventId={"02fc811b-1e67-402e-ac62-3f376cf33b6b"} onGroupChange={(change) => handleChange("group", change)} />,
254+
children: (
255+
<GroupManager
256+
eventId={"02fc811b-1e67-402e-ac62-3f376cf33b6b"}
257+
onGroupChange={(change) => handleChange("group", change)}
258+
/>
259+
),
256260
},
257261
{
258262
label: "Confirmation",
@@ -261,24 +265,24 @@ function Registration() {
261265
{
262266
label: "E-Mail Verification",
263267
children: (
264-
<Box
265-
sx={{
266-
width: "100%",
267-
height: "20vh",
268-
display: "flex",
269-
justifyContent: "center",
270-
alignItems: "center",
271-
paddingTop: "3rem",
272-
}}
273-
>
274-
<Stack spacing={3} justifyContent={"center"}>
275-
<Mail color={"inherit"} sx={{ fontSize: "2rem" }} />
276-
<Typography>
277-
To complete the registration, please click on the link in the email
278-
we sent you!
279-
</Typography>
280-
</Stack>
281-
</Box>
268+
<Box
269+
sx={{
270+
width: "100%",
271+
height: "20vh",
272+
display: "flex",
273+
justifyContent: "center",
274+
alignItems: "center",
275+
paddingTop: "3rem",
276+
}}
277+
>
278+
<Stack spacing={3} justifyContent={"center"}>
279+
<Mail color={"inherit"} sx={{ fontSize: "2rem" }} />
280+
<Typography>
281+
To complete the registration, please click on the link in the
282+
email we sent you!
283+
</Typography>
284+
</Stack>
285+
</Box>
282286
),
283287
},
284288
];
@@ -466,9 +470,10 @@ function Registration() {
466470
setIsSending(false);
467471
handleNext();
468472
})
469-
.catch(() => {
473+
.catch((error) => {
470474
alert(
471-
"Could not save Registration. Did you already submit? Please check your spam folder for verification mail.",
475+
"Could not save Registration. Please try again. If problem persists, please contact team@hackhpi.org. Error: " +
476+
JSON.stringify(error.data),
472477
);
473478
setIsSending(false);
474479
});
@@ -586,10 +591,7 @@ function Registration() {
586591
</Step>
587592
))}
588593
</Stepper>
589-
<Typography
590-
color={"text.disabled"}
591-
sx={{ marginTop: 3 }}
592-
>
594+
<Typography color={"text.disabled"} sx={{ marginTop: 3 }}>
593595
Read our{" "}
594596
<Link href={"/privacy"} color={"inherit"}>
595597
privacy policy

0 commit comments

Comments
 (0)