- {step > 0 && step < 5 && (
- <>
-
setStep(step - 1)}>
- Back
-
-
{
- if (step === 1) {
- // Verification for space name
- if (data.spaceName === "") {
- toast.error("Please enter space name!");
- return;
- }
- setStep(step + 1);
- } else if (step === 2) {
- // Verification for admin credentials
- if (data.adminEmail === "") {
- toast.error("Please enter admin email!");
- return;
- } else if (data.adminPassword === "") {
- toast.error("Please enter admin password!");
- return;
- } else if (data.adminPassword !== data.adminPassword2) {
- toast.error("Two passwords do not match!");
- return;
- }
- setStep(step + 1);
- } else if (step === 3) {
- // Verification for invitation rule
- if (data.inviteRule === null) {
- toast.error("Please choose one option!");
- return;
- }
- setStep(step + 1);
- } else if (step === 4) {
- // Verification for invitation link
- setStep(step + 1);
- }
- }}
- >
- Next
-
- >
- )}
- {step === 0 &&
setStep(step + 1)} />}
- {step === 1 && }
- {step === 2 && }
- {step === 3 && }
- {step === 4 && }
- {step === 5 && (
- {
- // TODO: finish it
- console.log("onboarding steps completed:", data);
- }}
- />
- )}
+ {step === 0 && }
+ {step === 1 && }
+ {step === 2 && }
+ {step === 3 && }
+ {step === 4 && }
+ {step === 5 && }
+ {step === 6 && }