Skip to content

Commit cd325a8

Browse files
committed
fix: 회원가입 완료 후 연결 페이지 변경
1 parent 23a3faf commit cd325a8

File tree

1 file changed

+48
-49
lines changed

1 file changed

+48
-49
lines changed

src/page/signup/SignUp.tsx

Lines changed: 48 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ const SignUp = () => {
4848

4949
signUp(payload, {
5050
onSuccess: () => {
51-
navigate(PATH.INTRO);
51+
console.log(userData.onboardingPage);
52+
navigate(PATH.INTRO, { state: { pageState: userData.onboardingPage } });
5253
},
5354
onError: () => {},
5455
});
@@ -62,57 +63,55 @@ const SignUp = () => {
6263
<p className={styles.descriptionText}>{SIGNUP_MESSAGE}</p>
6364
</header>
6465

65-
<form onSubmit={handleSignUp}>
66-
<section>
67-
<div className={styles.basicInfoContainer}>
68-
<h2 className={styles.infoText}>기본 정보</h2>
69-
<span>
70-
<IcEssentialDot className={styles.essentialIcon} />
71-
<span className={styles.essentialText}>필수 입력 항목</span>
72-
</span>
73-
</div>
74-
<div className={styles.basicInfoSection}>
75-
<BasicInfoSection
76-
name={name}
77-
email={email}
78-
birth={birth}
79-
setName={setName}
80-
setEmail={setEmail}
81-
setBirth={setBirth}
82-
selectedJob={selectedJob}
83-
setSelectedJob={setSelectedJob}
84-
inputJob={inputJob}
85-
setInputJob={setInputJob}
86-
/>
87-
</div>
88-
</section>
89-
90-
<section>
91-
<div className={styles.fitInfoContainer}>
92-
<span className={styles.infoText}>맞춤 정보</span>
93-
<p className={styles.fitInfoText}>{FIT_INFO_MESSAGE}</p>
94-
</div>
95-
<div className={styles.surveySection}>
96-
<SurveySection answers={answers} setAnswers={setAnswers} />
97-
</div>
98-
</section>
99-
100-
<div className={styles.agreementContainer}>
101-
<button onClick={() => setIsChecked(!isChecked)}>
102-
<CheckIcon className={styles.checkboxIcon} />
103-
</button>
104-
<p className={styles.agreeText}>{PERSONAL_INFO_AGREEMENT}</p>
105-
<Link to={import.meta.env.VITE_TOS_LINK} className={styles.seeText}>
106-
보기
107-
</Link>
66+
<section>
67+
<div className={styles.basicInfoContainer}>
68+
<h2 className={styles.infoText}>기본 정보</h2>
69+
<span>
70+
<IcEssentialDot className={styles.essentialIcon} />
71+
<span className={styles.essentialText}>필수 입력 항목</span>
72+
</span>
10873
</div>
74+
<div className={styles.basicInfoSection}>
75+
<BasicInfoSection
76+
name={name}
77+
email={email}
78+
birth={birth}
79+
setName={setName}
80+
setEmail={setEmail}
81+
setBirth={setBirth}
82+
selectedJob={selectedJob}
83+
setSelectedJob={setSelectedJob}
84+
inputJob={inputJob}
85+
setInputJob={setInputJob}
86+
/>
87+
</div>
88+
</section>
10989

110-
<div className={styles.buttonContainer}>
111-
<SignUpButton onClick={handleSignUp} disabled={!isValid || !userData}>
112-
가입하기
113-
</SignUpButton>
90+
<section>
91+
<div className={styles.fitInfoContainer}>
92+
<span className={styles.infoText}>맞춤 정보</span>
93+
<p className={styles.fitInfoText}>{FIT_INFO_MESSAGE}</p>
94+
</div>
95+
<div className={styles.surveySection}>
96+
<SurveySection answers={answers} setAnswers={setAnswers} />
11497
</div>
115-
</form>
98+
</section>
99+
100+
<div className={styles.agreementContainer}>
101+
<button onClick={() => setIsChecked(!isChecked)}>
102+
<CheckIcon className={styles.checkboxIcon} />
103+
</button>
104+
<p className={styles.agreeText}>{PERSONAL_INFO_AGREEMENT}</p>
105+
<Link to={import.meta.env.VITE_TOS_LINK} className={styles.seeText}>
106+
보기
107+
</Link>
108+
</div>
109+
110+
<div className={styles.buttonContainer}>
111+
<SignUpButton onClick={handleSignUp} disabled={!isValid || !userData}>
112+
가입하기
113+
</SignUpButton>
114+
</div>
116115
</div>
117116
</main>
118117
);

0 commit comments

Comments
 (0)