Skip to content
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

[GGFE-48] Match Slot 스타일 #813

Merged
merged 4 commits into from
Jun 8, 2023

Conversation

42sungwook
Copy link
Contributor

📌 개요

  • 슬롯 그리드 스타일 적용

💻 작업사항

  • 기존 이중배열로 오던 로직이 배열로 오게됨에 따라 슬롯을 한줄에 한개씩만 보여주던 로직 수정

✅ 변경로직

@42sungwook 42sungwook self-assigned this Jun 5, 2023
Copy link
Contributor

@parksangmin1543 parksangmin1543 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

변경사항 확인했습니다!

Copy link
Contributor

@PHJoon PHJoon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셨습니다! 슬롯 기존 배치처럼 보여지는 것 확인했습니다! 👍

Copy link
Member

@yoouyeon yoouyeon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수고하셨습니다! 슬롯들 잘 나오네요 👍👍

Comment on lines 92 to 118
{matchBoards.map((slot, index, array) => {
if (stringToHourMin(slot.startTime).sMin !== '00') {
return null;
}
const count = countSlotsInHour(slot);
const nextSlots = array.slice(index, index + count);

return (
<div
key={index}
ref={getScrollCurrentRef(stringToHourMin(slot.startTime).nHour)}
>
{stringToHourMin(slot.startTime).sMin === '00' && (
<MatchTime key={index} startTime={slot.startTime} />
)}
<div className={styles.slotGrid}>
{nextSlots.map((nextSlot, nextIndex) => (
<MatchSlot
key={index + nextIndex}
toggleMode={toggleMode}
slot={nextSlot}
/>
))}
</div>
</div>
);
})}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return문의 로직이 좀 길어져서 보기 어려운 것 같기도 한데, matchBoards 배열을 return문 위에서 이중배열로 변환한 뒤에 return문에서는 기존처럼 이중배열로 다루는 것은 어떨까요?? (가능한 방법인지 잘 모르겠네요;;)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

프론트에서 애초에 이중배열로 바꾸는 처리는 비효율적이라고 생각해서 이렇게 바꿔본거였는데 관리자 페이지쪽하다가 결국 이중배열로 써야될 것 같아서 백에 다시 이중배열로 넘겨달라고 요청했어요.

@42sungwook 42sungwook closed this Jun 5, 2023
@42sungwook 42sungwook reopened this Jun 8, 2023
@42sungwook
Copy link
Contributor Author

아직 라디오 모드랑 스타일 적용이 완성되지 않았는데 그 부분은 다시 PR남기도록 하겠습니다!

@42sungwook 42sungwook merged commit 84b0d71 into GGFE-00/Feat/api-refactoring Jun 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants