-
Notifications
You must be signed in to change notification settings - Fork 1
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: Nav Header 구현 #11
Conversation
|
||
import HeaderLeft from './items/HeaderLeft'; | ||
|
||
import Close from '@/assets/svg/LargeClose.svg?react'; |
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.
이렇게 정의하면 lint 에러가 나오지 않나요??
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.
hook과 컴포넌트와 svg를 일부러 구분해놓았는데 다 붙이는게 나을까요?
const params = [goBack, title, spark].filter((param) => { | ||
return param !== undefined; | ||
}); | ||
if (params.length > 1) { | ||
throw new Error('goBack, title, spark 중 하나만 입력해야 합니다.'); | ||
} |
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.
commnet에 있는것처럼 Param에서 goback, title, spark는 셋중 각각 하나만 입력이 가능합니다!
if (goBack) { | ||
return ( | ||
<ArrowLeftThick | ||
className={'flex-1 mr-[20px]'} | ||
onClick={() => navigate(-1)} | ||
/> | ||
); | ||
} else if (spark) { | ||
return ( | ||
<div className={'flex flex-row flex-1 items-center'}> | ||
<SparkSymbol /> | ||
<SparkText /> | ||
</div> | ||
); | ||
} else if (title && title.length > 0) { | ||
return ( | ||
<> | ||
<span className={'flex-1 text-title4-eb'}>{title}</span> | ||
</> | ||
); | ||
} |
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.
명령형 프로그래밍이랑 선언형 프로그램 공부하시면 좋을것 같아요!
이 부분은 제가 한번 작성해보겠습니다!
이슈 번호
작업한 목록을 작성해 주세요
스크린샷
pr 포인트나 궁금한 점을 작성해 주세요
연관된 issue: #undefined