-
Notifications
You must be signed in to change notification settings - Fork 1
✨ feat: 로그인/회원가입 페이지 내에서 모달창 닫기 방법 추가 #96
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
Conversation
Moon-ju-young
left a comment
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.
수고하셨습니다! 다만 esc키와 modal 바깥쪽을 눌렀을 때 확인 버튼을 누르는 것과 모두 같은 동작을 한다면 해당 로직을 Modal component 내에 넣는 게 낫지 않을까? 하는 생각이 드네요~
|
맞아요.. 저도 하고나서 보니까 모달이 쓰이는 페이지에서는 이런 작업을 다 반복해야 할 것 같아서 그냥 Modal 컴포넌트 내에 구현을 하는게 나을것 같다는 생각이 들었어요! 한번 시도 해보겠습니다~! |
|
@Moon-ju-young 생각보다 쉽게 분리가 가능했네요~ 확인 한번만 더 부탁드립니다 pr 내용에도 반영하겠습니다~ |
| const handleModalConfirm = () => { | ||
| function handleModalConfirm() { | ||
| setModal({ isOpen: false, 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.
💬 원래대로 써도 되지 않을까 싶네요!
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.
저희가 함수 선언식을 화살표 함수가 아닌 function으로 정했던걸로 알고있어서 수정했습니다!
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.
이부분은 화살표로 쓰셔도 상관없습니다! 컴포넌트만 통일입니다
minimo-9
left a comment
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 handleModalConfirm = () => { | ||
| function handleModalConfirm() { | ||
| setModal({ isOpen: false, 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.
이부분은 화살표로 쓰셔도 상관없습니다! 컴포넌트만 통일입니다
📌 변경 사항 개요
로그인 및 회원가입 페이지 내에서 모달창을 닫을 수 있는 방법 2가지를 추가했습니다.
이는 모달 컴포넌트 내에서 구현되었으며, onClose 속성으로 간단히 사용이 가능합니다.
📝 상세 내용
모달 컴포넌트의 props에 ref를 추가하고 모달창에 ref를 연결🔗 관련 이슈
🖼️ 스크린샷(선택사항)
💡 참고 사항
웬만한 경우에 대한 테스트를 진행했을 때 문제는 없었지만, 혹시나 발생하는 오류가 있다면 알려주세요!