-
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
[황은지] week13 #412
The head ref may contain hidden characters: "part3-\uD669\uC740\uC9C0-week13"
[황은지] week13 #412
Conversation
[Fix] delete merged branch github action
…into part3-황은지-week13
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.
잘 작성해주셨습니다! 👍
next 의 Link컴포넌트를 통해서 params를 넘기는 방법은 https://chaeyoung2.tistory.com/52 해당 내용 한번 확인해보시면 좋을 것 같습니다!
고생하셨습니다!
height: 20px; | ||
`; | ||
|
||
export default AddLink; |
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.
잘 작성해주셨습니다. 스타일드 컴포넌트도 실제 컴포넌트 아래에 있어서, 가독성도 좋은 것 같습니다
cursor: pointer; | ||
`; | ||
|
||
export default FolderListButton; |
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.
재사용 가능한 컴포넌트로 잘 작성해주셨습니다 👍
@@ -0,0 +1,26 @@ | |||
import styled from 'styled-components'; | |||
|
|||
const SIZES = { |
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.
객체형태로 스타일 관리도 잘 해주신 것 같습니다
import starIcon from '../../assets/star.svg'; | ||
import kebabIcon from '../../assets/kebab.svg'; | ||
|
||
function formatDate(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.
해당 유틸 함수 같은 함수는 다른 파일로 관리해주시면 좋을 것 같습니다!
|
||
return ( | ||
<button className={styles.card} onClick={handleClick}> | ||
<LinkImage className={styles.image - wrapper} $img={imgUrl}></LinkImage> |
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.
해당 컴포넌트는 단일태그로 작성해주실 수 있을 것 같습니다
<FolderListButton onClick={handelOnClickTotal} $isSelected={selectedFolderName === '전체'}> | ||
전체 | ||
</FolderListButton> | ||
{Object.values(folderList).map((folder) => { |
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.
folderList가 props로 전달될 때부터 배열형태 전달해주시는 것은 어떨까요 ?
<SnsButton $icon="facebook" /> | ||
<SnsButton $icon="twitter" /> | ||
<SnsButton $icon="youtube" /> | ||
<SnsButton $icon="instagram" /> |
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.
해당 부분도 ['facebook', ..] 이런 배열형태의 데이터로 map으로 중복을 줄일 수 있을 것 같습니다
<div | ||
className={styles.modal - container} | ||
ref={modalBackground} | ||
onClick={(e) => { |
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.
onClick내에서 함수를 인라인 함수로 생성하시기 보다, 외부에 익명함수로 작성해주시면 좋을 것 같습니다
<div className={styles.modal - content}> | ||
<ModalTitle>{title}</ModalTitle> | ||
<ModalInput placeholder="내용 입력" /> | ||
<GradientButton className={styles.modal - close - btn} size="auto" onClick={() => setModalOpen(false)}> |
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.
해당 onClick도 위와 동일합니다!
const [linkList, setLinkList] = useState({}); | ||
|
||
useEffect(() => { | ||
(async function loadData() { |
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.
useEffect 안에서 함수를 생성하기 보다 외부에서 생성해서 호출하는 것이 어떨까요 ?
요구사항
기본
주요 변경사항
멘토에게
기존의 react 프로젝트에서 router를 이용하여 컴포넌트를 이동할 때 props를 전달하면 이동했었는데,
link 컴포넌트를 사용해서 페이지 이동 시 props는 어떻게 전달하나요?