Skip to content

Commit 736ceed

Browse files
committed
Minor fixes
1 parent f561eef commit 736ceed

File tree

2 files changed

+54
-46
lines changed

2 files changed

+54
-46
lines changed

src/components/Registration/GroupManager/GroupManager.jsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
Typography,
99
} from "@mui/material";
1010
import { LoadingButton } from "@mui/lab";
11-
import { useMemo, useState } from "react";
11+
import {useEffect, useMemo, useState} from "react";
1212
import { GroupRest } from "../../../rest/GroupRest";
1313

1414
export function GroupManager(props) {
@@ -19,6 +19,7 @@ export function GroupManager(props) {
1919
const [groupInputError, setGroupInputError] = useState(false);
2020
const groupRest = useMemo(() => new GroupRest(), []);
2121

22+
2223
function createNewGroup() {
2324
setLoadingNewTeam(true);
2425
setGroupInputError(false)
@@ -44,6 +45,10 @@ export function GroupManager(props) {
4445
});
4546
}
4647

48+
useEffect(() => {
49+
props.onGroupChange(group)
50+
}, [group]);
51+
4752
function renderGroupSelection() {
4853
return (
4954
<Box sx={{ pt: 5, pb: 5 }}>

src/components/Registration/Registration.jsx

Lines changed: 48 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -228,58 +228,61 @@ const legal = [
228228
},
229229
];
230230

231-
const steps = [
232-
{
233-
label: "Personal data",
234-
content: personalData,
235-
},
236-
{
237-
label: "Motivation",
238-
content: motivation,
239-
},
240-
{
241-
label: "Skills",
242-
content: skills,
243-
},
244-
{
245-
label: "Team members",
246-
children: <GroupManager eventId={"02fc811b-1e67-402e-ac62-3f376cf33b6b"} />,
247-
},
248-
{
249-
label: "Confirmation",
250-
content: legal,
251-
},
252-
{
253-
label: "E-Mail Verification",
254-
children: (
255-
<Box
256-
sx={{
257-
width: "100%",
258-
height: "20vh",
259-
display: "flex",
260-
justifyContent: "center",
261-
alignItems: "center",
262-
paddingTop: "3rem",
263-
}}
264-
>
265-
<Stack spacing={3} justifyContent={"center"}>
266-
<Mail color={"inherit"} sx={{ fontSize: "2rem" }} />
267-
<Typography>
268-
To complete the registration, please click on the link in the email
269-
we sent you!
270-
</Typography>
271-
</Stack>
272-
</Box>
273-
),
274-
},
275-
];
276231

277232
function Registration() {
278233
const [activeStep, setActiveStep] = React.useState(0);
279234
const [values, setValues] = useState({});
280235
const [isSending, setIsSending] = useState(false);
281236
const registrationRest = useMemo(() => new RegistrationRest(), []);
282237

238+
239+
240+
const steps = [
241+
{
242+
label: "Personal data",
243+
content: personalData,
244+
},
245+
{
246+
label: "Motivation",
247+
content: motivation,
248+
},
249+
{
250+
label: "Skills",
251+
content: skills,
252+
},
253+
{
254+
label: "Team members",
255+
children: <GroupManager eventId={"02fc811b-1e67-402e-ac62-3f376cf33b6b"} onGroupChange={(change) => handleChange("group", change)} />,
256+
},
257+
{
258+
label: "Confirmation",
259+
content: legal,
260+
},
261+
{
262+
label: "E-Mail Verification",
263+
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>
282+
),
283+
},
284+
];
285+
283286
function handleChange(name, inputValue) {
284287
const newValue = { ...values };
285288
newValue[name] = inputValue;

0 commit comments

Comments
 (0)