-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Origin/feat/main/#12 #22
Changes from all commits
f93babb
dc87721
0c4adb9
9a4efec
74c5f8e
549f697
c9d25a7
fddeb9b
9dcfd47
b078814
0188f84
f1ac666
927ee46
9d82423
47075ea
048086e
06a1699
621beff
c77fa73
37182dc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ | |
"@types/jest": "^27.0.1", | ||
"@types/js-cookie": "^3.0.6", | ||
"@types/node": "^16.7.13", | ||
"@types/react": "^18.0.0", | ||
"@types/react": "^18.3.3", | ||
"@types/react-dom": "^18.0.0", | ||
"axios": "^1.7.2", | ||
"concurrently": "^8.2.2", | ||
|
@@ -19,13 +19,15 @@ | |
"react-dom": "^18.3.1", | ||
"react-markdown": "^9.0.1", | ||
"react-query": "^3.39.3", | ||
"react-query-devtools": "^2.6.3", | ||
"react-router-dom": "^6.23.1", | ||
"react-scripts": "5.0.1", | ||
"react-syntax-highlighter": "^15.5.0", | ||
"remark-gfm": "^4.0.0", | ||
"styled-components": "^6.1.11", | ||
"styled-reset": "^4.5.2", | ||
"sweetalert2": "^11.11.1", | ||
"swiper": "^11.1.8", | ||
"typescript": "^4.4.2", | ||
"unified": "^11.0.5", | ||
"unist-util-position": "^5.0.0", | ||
|
@@ -53,6 +55,7 @@ | |
}, | ||
"packageManager": "[email protected]+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e", | ||
"devDependencies": { | ||
"@types/react-syntax-highlighter": "^15.5.13" | ||
"@types/react-syntax-highlighter": "^15.5.13", | ||
"@types/swiper": "^6.0.0" | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,47 @@ | ||
import React,{ Dispatch, SetStateAction} from "react"; | ||
import React, { Dispatch, SetStateAction, useState } from "react"; | ||
import * as S from "./style"; | ||
import TextField from "src/components/textFields"; | ||
import { Sign } from "src/types/auth/signup.type"; | ||
import Button from "src/components/button/index"; | ||
import arrowLeft from "src/assets/imgs/Signimg/arrow-left.svg"; | ||
|
||
|
||
interface Props { | ||
setSection: Dispatch<SetStateAction<string>>; | ||
signupData: Sign; | ||
handleSignupData: (e: React.ChangeEvent<HTMLInputElement>) => void; | ||
submitSignupDataSecond: () => void; | ||
keydownButton: (e: React.KeyboardEvent) => void; | ||
} | ||
setSection: Dispatch<SetStateAction<string>>; | ||
signupData: Sign; | ||
handleSignupData: ( | ||
e: React.ChangeEvent<HTMLInputElement | HTMLSelectElement> | ||
) => void; | ||
emailKeydownButton: (e: React.KeyboardEvent) => void; | ||
submitSignupDataSecond: () => void; | ||
keydownButton: (e: React.KeyboardEvent) => void; | ||
chckEmailAuthCode: () => void; | ||
isWaiting: string; | ||
} | ||
|
||
const SignupSecond = ({ setSection,signupData, | ||
handleSignupData, | ||
keydownButton, | ||
submitSignupDataSecond, | ||
}:Props) => { | ||
const SignupSecond = ({ | ||
setSection, | ||
signupData, | ||
handleSignupData, | ||
keydownButton, | ||
submitSignupDataSecond, | ||
chckEmailAuthCode, | ||
emailKeydownButton, | ||
isWaiting, | ||
}: Props) => { | ||
return ( | ||
<> | ||
<S.InputContainer> | ||
<S.SignBack onClick={()=>setSection("first")}> | ||
<img src={arrowLeft} alt="돌아가라 어리석은것" /> | ||
<span>돌아가기</span> | ||
<S.SignBack onClick={() => setSection("first")}> | ||
<img src={arrowLeft} alt="돌아가라 어리석은것" /> | ||
<span>돌아가기</span> | ||
</S.SignBack> | ||
<S.InputText> | ||
<span> | ||
이름<p>*</p> | ||
</span> | ||
<TextField | ||
name="name" | ||
value={signupData.name} | ||
name="memberName" | ||
value={signupData.memberName} | ||
type="text" | ||
onChange={handleSignupData} | ||
placeholder="이름을 입력해주세요" | ||
|
@@ -42,34 +51,76 @@ const SignupSecond = ({ setSection,signupData, | |
</S.InputText> | ||
<S.InputText> | ||
<span> | ||
이메일<p>*</p> | ||
학교<p>*</p> | ||
</span> | ||
<TextField | ||
name="email" | ||
value={signupData.email} | ||
type="text" | ||
<S.selectButton | ||
name="memberSchool" | ||
value={signupData.memberSchool} | ||
onChange={handleSignupData} | ||
placeholder="이메일을 입력해주세요" | ||
onKeyDown={keydownButton} | ||
style={{}} | ||
/> | ||
> | ||
<option value="" selected >학교를 선택해주세요</option> | ||
<option value="대구소프트웨어마이스터고"> | ||
대구소프트웨어마이스터고 | ||
</option> | ||
<option value="부산소프트웨어마이스터고"> | ||
부산소프트웨어마이스터고 | ||
</option> | ||
<option value="광주소프트웨어마이스터고"> | ||
광주소프트웨어마이스터고 | ||
</option> | ||
<option value="대덕소프트웨어마이스터고"> | ||
대덕소프트웨어마이스터고 | ||
</option> | ||
<option value="기타" > | ||
기타 | ||
</option> | ||
</S.selectButton> | ||
</S.InputText> | ||
<S.InputText> | ||
<span> | ||
이메일 인증번호<p>*</p> | ||
이메일<p>*</p> | ||
</span> | ||
<S.emailTextField> | ||
<TextField | ||
name="memberEmail" | ||
value={signupData.memberEmail} | ||
type="text" | ||
onChange={handleSignupData} | ||
placeholder="이메일을 입력해주세요" | ||
onKeyDown={emailKeydownButton} | ||
style={{ width: "70%" }} | ||
/> | ||
<S.emailNumberButton onClick={chckEmailAuthCode}> | ||
<span>인증하기</span> | ||
</S.emailNumberButton> | ||
</S.emailTextField> | ||
</S.InputText> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. S.InputText가 중복적으로 사용되는데 컴퍼넌트로 분리 하면 어떨까요? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 너무 많은 컴퍼넌트 분리는 안좋을거 같고 S.InputText는 자체로도 재사용성을 늘려서 상관없어 보입니다 |
||
<S.InputText> | ||
<S.emailPostField> | ||
<span> | ||
{" "} | ||
이메일 인증번호<p>*</p> | ||
</span> | ||
<p> | ||
{isWaiting === "전송중" | ||
? "이메일 전송중.." | ||
: isWaiting === "전송성공" | ||
? "이메일 전송성공" | ||
: ""} | ||
</p> | ||
</S.emailPostField> | ||
<TextField | ||
name="email" | ||
value={signupData.checkNumber} | ||
type="password" | ||
name="authCode" | ||
value={signupData.authCode} | ||
type="text" | ||
onChange={handleSignupData} | ||
placeholder="이메일을 입력해주세요" | ||
placeholder="인증번호를 입력해주세요" | ||
onKeyDown={keydownButton} | ||
style={{}} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 스타일 제거해도 좋을 것 같습니다. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 없으면 오류나서 넣어 두었습니다 |
||
/> | ||
</S.InputText> | ||
</S.InputContainer> | ||
<Button text="회원가입" style={{}} onClick={submitSignupDataSecond}/> | ||
<Button text="회원가입" style={{}} onClick={submitSignupDataSecond} /> | ||
</> | ||
); | ||
}; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
가독성이 떨어지는데
<option value="대구소프트웨어마이스터고">대구소프트웨어마이스터고</option> <option value="부산소프트웨어마이스터고">부산소프트웨어마이스터고</option> <option value="광주소프트웨어마이스터고">광주소프트웨어마이스터고</option> <option value="대덕소프트웨어마이스터고">대덕소프트웨어마이스터고</option>
이런식으로 변경하는건 어떨까요?