-
Notifications
You must be signed in to change notification settings - Fork 3
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
[Feat] 로그인 & 회원가입 구현 #98
The head ref may contain hidden characters: "82-feat-\uB85C\uADF8\uC778-\uD68C\uC6D0\uAC00\uC785-\uAD6C\uD604"
Conversation
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.
더이상 가르칠것이 없으니 이제그만 하산하시지요
}, | ||
body: JSON.stringify(formData), | ||
}); |
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.
}, | |
body: JSON.stringify(formData), | |
}); | |
}, | |
body: JSON.stringify(formData), | |
}); |
json으로 파싱해서 보내는거면 accept는 없어되지않아요?
<div className={cn('auth-section-wrapper')}> | ||
{AUTH_SECTION.map((text, i) => ( | ||
<div key={text} className={cn('auth-section')}> | ||
<Link href='/sign-up' className={cn('auth-section-text')}> |
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.
<Link href='/sign-up' className={cn('auth-section-text')}> | |
<Link href={ROUTER.AUTH.SUGN_UP} className={cn('auth-section-text')}> |
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.
상수로 쓰면 좋을거같아요
}, | ||
onBlur: () => handleCheckDuplicatedEmail(), | ||
}), |
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.
value를 주입하지 않아도 되나요? 저스트 궁금
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.
지니어스! 근데 value가 아니라 event 객체로 들어오네요! 그래도 바아로 도입
<InputField | ||
label='닉네임' | ||
placeholder={PLACEHOLDER.NICKNAME} | ||
sizeVariant='md' | ||
labelSize='sm' | ||
errorMessage={errors.nickname?.message} | ||
{...registers.nickname} | ||
/> |
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.
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.
오 대박 오 근데 아직 머지 안된 부분 맞죵? 머지 되면 바로 적용 하겠슴니다
gender: register('gender', { | ||
required: ERROR_MESSAGE.GENDER.required, | ||
setValueAs: (value) => (value === '여자' ? 'FEMALE' : 'MALE'), | ||
}), |
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.
이건 merge되면 한번 이야기해주세요
disabled={!isValid} | ||
className={cn('button')} | ||
fontSize={24} | ||
backgroundColor={isValid ? 'background-primary' : 'background-gray-40'} |
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.
이건 버튼컴포넌트 안에 css에 작성하는게 더 나아보여요우
: disabled {
대충 비활성화 상태 색상
}
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.
오호!! 근데 그럼 prop을 통해 background 설정이 불가하지 않나요?!!?
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.
disabled상태에서만 적용되는 style이라서 지금 하신거랑 똑같을걸요?
src/app/(auth)/sign-up/page.tsx
Outdated
|
||
export default function Page() { | ||
return ( |
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.
export default function Page() { | |
return ( | |
export default function SignUpPage() { | |
return ( |
이름은 표현하는게 좋을거같아요
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.
수고하셨습니다~
} | ||
}; | ||
|
||
export const postSignup = async (formData: FormData) => { |
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.
오호~ formData를 미리 stringify된 걸로 가져오네요~
뭔가 아래 postSignin 함수는 함수 내부에서 string처리하는데 여긴 string으로 처리된 값을 가져오는데, 이 부분 어떻게 생각하시나요?
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.
postSignin이랑 postSignup의 보내주는 데이터 형식이 다릅니다!! signup은 formdata 형식으로 보내주고, signin은 json 형식이라서요,,
}, | ||
body: JSON.stringify(formData), | ||
}); | ||
const data = await response.json(); |
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.
구조분해해서 data.data로 리턴하는 게 사용할 때 더 쉬울 것 같아요.
responseData.data.accessToken 이런 식으로 불러오는 것을 responseData.accessToken으로 더 쉽게 불러올 수 있을 것 같아요
const data = await response.json(); | |
const { data } = await response.json(); |
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.
엇 그러면 SignInModal내에서 response의 안의 status하고 Message 확인이 어렵지 않을까요..?!
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.
include 순서 일치하면 좋을 것 같습니다!
const handleSignin = () => { | ||
setIsOpenModal(true); | ||
}; |
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.
뭔가 이름이 살짝 아쉬운 느낌이네요. handleOpenSignin? handleOpenModal?
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.
여긴 저스트 테스트 페이지라서 임의로 지어봤답니당 😆 로그인은 모달창이라 아마 이 페이지는 삭제될 거예요!!
margin: 0 auto; | ||
margin-bottom: 6rem; |
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.
합쳐서 쓸 수 있지 않을까요...?
margin: 0 auto; | |
margin-bottom: 6rem; | |
margin: 0 auto 6rem; |
font-size: 3rem; | ||
font-weight: bold; |
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.
이것도 font에 등록하는 게 좋을 것 같아요.(글씨체 pretendard 아닌가요?)
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.
맞아요!! 알고보니 파일 안에 정의되어있엇군뇨,,
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.
고생하셨습니다 리액트 훅 폼 마스터 되겠아용~!
public/svgs/gitHub.svg
Outdated
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.
고양이 뚫렸네여?
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.
오모낫 혹시 뚫리면 문제가 될 수 있을까요,,,!?!??!?!
.no-show { | ||
display: none; | ||
} | ||
|
||
.checkbox-input { | ||
display: none; | ||
} |
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.
합쳐서 적을 수 있겠다 정도,,?
src/styles/toast/toastAnimation.scss
Outdated
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.
와 이게 커스텀 한건가요? 싱기하다
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.
전 그저 복붙만 했을 뿌운,,
} catch (error) { | ||
console.error('로그인 요청 실패', error); | ||
} |
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.
여기는 console찍혀도 될랑가용?
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.
어머머머 센스쟁이 바아로 수정 갑니닷
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.
고생 많으셨습니다 👏👏
@@ -27,6 +30,7 @@ export default async function RootLayout({ | |||
<body> | |||
<Providers> | |||
<HydrationBoundary state={dehydrate(queryClient)}> | |||
<ToastContainer autoClose={2000} theme='dark' position='top-center' transition={Zoom} /> |
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.
요거는 토스트 사용하려면 꼭 있어야하는 부분일까요?! 토스트 위치가 밑에 있어도 괜찮아보이긴해요🤔
CONFIRM_PASSWORD: '비밀번호를 한번 더 입력해주세요', | ||
NICKNAME: '닉네임을 입력해주세요', | ||
PHONE_NUMBER: '휴대폰 번호 (-없이)를 입력해주세요', | ||
BIRTHDAY: 'YYYY / MM / DD', |
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.
아까도 말씀드렸는데 여기를 YYYYMMDD로 하던지 통일시키는게 좋아보여요~!
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.
👍👍
🚀 작업 내용
📝 참고 사항
fill 처리 해두었습니다.
🖼️ 스크린샷
🚨 관련 이슈 (이슈 번호)
✅ 체크리스트