-
Notifications
You must be signed in to change notification settings - Fork 2
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
Refactor/#400 비로그인 상태로 댓글 작성 시도 시 로그인 권유 모달이 표시되도록 변경 #401
Conversation
변경 과정에서 Avatar, Input 컴포넌트에 대한 중복된 삼항연산자를 제거하였음.
) : ( | ||
<> | ||
<Avatar src={defaultAvatar} alt="익명 프로필" /> | ||
<Input type="text" onFocus={recommendLogin} placeholder="댓글 추가..." maxLength={0} /> |
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.
💬 onFocus 이벤트로 모달을 띄우기 때문에 input에 값을 입력할 수 없지만,
maxLength를 0으로 명시해서 입력할 수 없는 input이라는 의미를 주고싶었는데 여러분들은 어떻게 생각하시는지요?
위쪽, 정상 input에 maxLength 200과 대조 되어 의미가 강조될 것 같아 작성했습니다.
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.
로그인 권유하도록 모달 띄워주도록 변화한 거 잘 확인했습니다!
const recommendLogin: React.FocusEventHandler<HTMLInputElement> = (e) => { | ||
e.currentTarget.blur(); | ||
openLoginModal(); | ||
}; |
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.
👍 모달을 열때 input을 blur 시키는 디테일 좋네요
<LoginButton type="button" onClick={goLoginPage}> | ||
로그인하러 가기 | ||
</LoginButton> |
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로 개선되어도 될 것 같네요
굳이 navigate 함수가 필요한 로직은 아닌 것 같아서 링크로만 변경되어도 될 것 같아요
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.
좋은 의견 감사합니다~ 반영했습니다~
input을 모달 열린 상태일 때 비활성화 하도록 하여 핸들러 함수를 제거함
d7af869
to
6c82e84
Compare
📝작업 내용
💬리뷰 참고사항
코드에 간단한 설명 코멘트 적어둘게요~!
참고해 주세요~
본 PR은 #392 PR 먼저 merge 후 충돌 해결하여 merge할 예정입니다.
충돌 예상 코드는 LoginModal 내부 네비게이션 코드입니다~
#️⃣연관된 이슈
close #400