-
Notifications
You must be signed in to change notification settings - Fork 44
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
[정지성] Week11 #353
The head ref may contain hidden characters: "part2-\uC815\uC9C0\uC131-week11"
[정지성] Week11 #353
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.
프로젝트 끝나고 까지...!
수고많으셨습니다 :)
모달 관련된 내용은 커멘트로 남겼는데 혹시 이해 어려우시면 멘토링때 질문주셔요!
setTargetName(event.target.value); | ||
} | ||
function handleCloseModal(isOpen) { | ||
setIsModalOpen(isOpen); // 모달을 닫습니다. |
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.
모달을 닫는 동작의 경우 굳이 isOpen 인자를 안넘겨주고 false를 넣어주면 될 거 같아요~
{link.image_source ? ( | ||
<img | ||
src={moreoptionicon} | ||
alt="링크 게시물 옵션 버튼 아이콘 " | ||
src={link.image_source} | ||
className={`${styles.card_img} ${ | ||
isHovering ? styles.zoomIn : '' | ||
}`} | ||
onMouseOver={handleMouseOver} | ||
onMouseOut={handleMouseOut} | ||
alt={link.title} | ||
/> | ||
</button> | ||
) : ( | ||
<img | ||
src={thumbnail} | ||
className={`${styles.card_img} ${ | ||
isHovering ? styles.zoomIn : '' | ||
}`} | ||
onMouseOver={handleMouseOver} | ||
onMouseOut={handleMouseOut} | ||
alt="thumbnail_img" | ||
/> | ||
)} |
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.
이미지의 source, alt 내용만 다른 거 같은데 src에 image_source ?? thumbnail
로 하면 굳이 분기 처리 안해도 될 거 같아요
)) | ||
) : ( | ||
<div className={styles.noLinkText}> | ||
<p>저장된 링크가 없습니다</p> | ||
</div> | ||
)} | ||
{isModalOpen && ( |
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.
여기서 open이 되어있는지 확인하고 내부에서도 또 모달이 open 상태인지 확인하고 있어서, 한 군데서만 확인해주면 좋을 거 같습니다!
<div className={styles.modal}> | ||
<div className={styles.modal__content}> |
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.
어느 정도 모달마다 뒤에는 dimmed 되고, 모달 닫는 창이 있고 등의 공통점이 있어요!
해당 부분을 공통 모달로 해서 Modal 컴포넌트를 만들고, 각기 다른 모달들은 Modal 컴포넌트에 children 으로 내용을 넘기는 구조를 추천드립니다!
요구사항
기본
심화
주요 변경사항
스크린샷
멘토에게