-
Notifications
You must be signed in to change notification settings - Fork 3
Feat/#218 medley #220
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/#218 medley #220
Conversation
joohaem
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 상수에Map객체를 사용해서
key: 특정 메들리의 _id 값 / value: 백그라운드 칼라값
으로 구성해서 이 객체를 불러다가 넣어주면 될 것 같아!!!!
그러면 가영이가 원하는 디자인적인 요소의 분리도 이루어지고, 클라에서도 유연성 있게 설계가 될 것 같당 -
로딩 로직
이건 내가 api들 다 swr로 치환하고, 로딩 로직들 Suspense로 치환하는 작업을 하려고 해!
이번주 내로 해볼게 !!!
| const moveMedley = (id: string) => { | ||
| navigate(routePaths.CardCollection, { state: { type: "medley", medleyId: id } }); | ||
| setSliderIdx(0); | ||
| }; |
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.
이거를 useMedleyLists 훅 안에 넣어놔도 되겠다!
다른 것들도 다 그래야겠네 하하하~.~
- string으로 직접 써주는 type 값을 const 상수로 빼내는 게 좋을 것 같다!
- setSliderIdx(0) 일 경우에, 안써도 되도록 하는 방안이 뭐가 있을까?
moveMedley->moveCardCollectionFromMedley같은 이름이 어떨지 ???
| interface MedleyPreviewProps { | ||
| closePreview: () => void; | ||
| } |
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.
❗ 질문1
프리뷰 컴포넌트게서 메들리리스트의 정보가 모두 필요한가요?
아니면 한 메들리의 프리뷰 정보가 필요한가요??
- 카드의 인덱스가 필요함 ->
medleyIdx: number; - 특정 메들리의 프리뷰 정보가 필요함 ->
{...previewCards}를 prop으로 받음._id: string, content: string - 특정 메들리의 정보도 필요 ->
title: string, ...
이것들을 다 props 로 받아주면 될 것 같고-
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.
/* 폴더 구조 */
Medley
└── MedleyPreiveiw
└── MedleyCard
구조가 위와 같은데, MedleyPreiveiw는 MedleyCard에서 사용합니당.
그래서 Medley에서 api 연결하구 props 전달해주려고 하는데,
MedleyCard에서는 preview 정보가 필요없거든요! 그래도 props로 전부 받아서 넘겨줘야 할까요?-?
아니면 MedleyPreiveiw에서 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.
api 통신을 한 번 더 하는 건 정말 불필요한 작업같고,
부분 전역적으로 사용하는 context를 사용할 수도 있겠지만
뎁스가 길지도 않아서, prop drilling 하는 게 나아보여요-
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.
네엡 감사합니당:D
| <St.Root> | ||
| <St.Container ref={outClickCloserRef}> |
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.
Modal 공통 컴포넌트 사용해주세요!
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.
Modal이 있었네 맞네ㅎㅎ 바루 반영할게요!
| {medleyLists && | ||
| medleyLists.data.map((medleyLists) => { | ||
| return ( | ||
| <St.MedleyWrapper key={medleyLists._id} onClick={toggleModal}> | ||
| <St.ContentTag>{medleyLists.sticker}</St.ContentTag> | ||
| <St.ContentTitle>{medleyLists.title}</St.ContentTitle> | ||
| </St.MedleyWrapper> | ||
| ); | ||
| })} |
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.
❗ 질문1
{isModalOpen && <MedleyPreview closePreview={toggleModal} />} 를 이 안에 넣어줘야겠지?
return 안의 요소들을 MedleyCard 로 따로 빼내고,
그 안에서 useModal 훅을 사용해서 각 카드에 독립적인 모달을 만들어주면 될 것 같은데!
어떤 에러가 나는지 잘 모르겠어. 자세히 설명해줄래?
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.
웅 거마워:D 오빠가 말한대러 다시 해볼게!! 왜 빼낼 생각을 안했으까😂😂
|
@joohaem HELP ME😂
|
?. 카드 주제 제목으로 오는 데이터들에 줄바꿈 표시도 함께 오나요?? 온다면 pre-wrap 해줘야 할 것 같아요!! |
|
아하 한 번 더 확인하고 다시 질문해보겠습니다! 알려주셔서 감사해요 (。˃́⌔˂̀。) 카드 주제 제목들은 줄바꿈 요청한 게 아직 반영이 안 돼서, 이후에 확인해보겠습니다!! |
|
|

📌 내용
⭐ 추가해야 하는 부분 ⭐
📌 질문할 부분
코드 맨 하단의
{isModalOpen && <MedleyPreview closePreview={toggleModal} />}에 props로 전달하고 싶었는데,자리를 옮기면 에러가 계속 나네요,,?😥😥
item은 사용안하는데, 제거하면 오류가 나는 이유를 아실까요?-?📸 스크린샷
KakaoTalk_20230309_061218095.mp4