-
Notifications
You must be signed in to change notification settings - Fork 2
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
[상점] 생협 운영 시간 추가 #536
[상점] 생협 운영 시간 추가 #536
Conversation
{filteredCampusInfo.slice(0, 1).map(({ id, name, opens }) => ( | ||
<div className={styles['info-block']} key={id}> | ||
<div className={styles['icon-wrapper']}> | ||
{SHOP_ICON[name as keyof typeof SHOP_ICON]} | ||
</div> | ||
<div className={styles['info-description-container']}> | ||
<div className={styles['info-title']}>{name}</div> | ||
{opens.map(({ day_of_week, open_time, close_time }) => ( | ||
<div className={styles['info-description']} key={`${id}-${day_of_week}`}>{`${day_of_week}: ${getFormattedShopTime(open_time, close_time)}`}</div> | ||
))} |
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.
아래 부분까지 3번 반복되는 로직같은데 별도의 컴포넌트로 분리해서 재사용해도 좋을 것 같단 생각이 들어요
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.
고민을 안해본건 아니였단 말이죠..
여기에서 밖에 안쓰는 로직이어서 분리를 해서 일부러 depth를 줄 필요가 있을까 싶었습니다!
한 번 분리해보고서 어떻게 읽히는지 확인해볼게요!
What is this PR? 🔍
Changes 📝
ScreenShot 📷
Precaution
✔️ Please check if the PR fulfills these requirements
develop
branch unconditionally?main
?yarn lint