-
Notifications
You must be signed in to change notification settings - Fork 28
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
나만의 칵테일과 관련된 프론트를 구현한다. (미완성) #264
Conversation
- 외부 모듈 사용
- 추천 질문과 구분 - 라우트 연결
- Name 컴포넌트 생성
- 클릭시 선택 - api 연결 필요 - 검색 기능 필요
- Slider 필요 - api 필요
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 onSelect = (e) => { | ||
const selectedId = e.target.dataset.id; | ||
const found = glasses.find((it) => it.id == selectedId); |
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 found = glasses.find((it) => it.id == selectedId); | |
const found = glasses.find(it => it.id === selectedId); |
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.
저게 ===로 하니까 동작을 안하더라구...
it.id는 number인데 selectedId는 dataset에서 나올 때에 문자열로 나와서!
그래서 parseInt를 해줬슴니다
const found = glasses.find(it => it.id === parseInt(selectedId));
<div> | ||
{/*Slider로 수정*/} | ||
{glasses && | ||
glasses.map((it) => ( |
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.
glasses.map((it) => ( | |
glasses.map(it => ( |
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 onSelect = (e) => { | ||
const selectedId = e.target.dataset.id; | ||
const found = ingredients().find((it) => it.id == selectedId); |
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 found = ingredients().find((it) => it.id == selectedId); | |
const found = ingredients().find(it => it.id === selectedId); |
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.
수정 완료
<Step> | ||
{({ accomplished, index }) => ( | ||
<div | ||
className={`indexed-step ${accomplished ? "accomplished" : null}`} |
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.
className={`indexed-step ${accomplished ? "accomplished" : null}`} | |
className={`indexed-step ${accomplished ? "accomplished" : ""}`} |
이건 확신은 없네요
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.
아래 아이들도 같이 변경되면 좋겠어요.
아니면 forEach를 돌려서 중복을 줄이는 것도 방법이겠네요
- ===를 사용, null대신 빈 문자열을 사용
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.
고생하셨습니당
머지를 하게 되면 리베이스를 해야 하니까 피곤할테니 클로즈도 나쁘지 않은 선택일 것 같은데요?
#263
아직 완전하게 구현된 상황은 아니지만 협업을 위해 우선 pr을 보냅니다.