-
Notifications
You must be signed in to change notification settings - Fork 0
[FE-193] feat: 달력컴포넌트 구현(년, 월 선택은 아직 안됨) #210
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
Conversation
✅ Deploy Preview for record-it-dev ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
Seongtaek-H
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.
확인했습니다.
| <DateBox date={1} gridColumnStart={monthYear.startDayOfMonth + 1} /> | ||
| {[...Array(monthYear.lastDayOfMonth)].map((_, i) => | ||
| i > 0 ? <DateBox key={i} date={i + 1} /> : 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.
1일 Datebox를 먼저 지정해주고 그 다음부터 순환하는 구조군요? 굿
| return ( | ||
| <div | ||
| className={`h-[36px] w-[36px] rounded-full text-[16px] font-medium text-grey-7`} | ||
| style={{ gridColumnStart }} |
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.
이렇게 style을 넘버로 넣어주면 어떻게 되는거에요??
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.
style={{gridColumnStart: 4}} 이런식으로 들어가게 되는거에요!
속성 명과, props명이 같아서 축약해서 적었씁니다
| setIsOpenCalendar: Dispatch<SetStateAction<boolean>> | ||
| } | ||
|
|
||
| export default function MyRecordCalendar({ |
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.
이부분 워터가 추상화하신 이유가 있다면 현상유지 아니라면 저도 세인트 의견에 동감
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.
아아 이거 디자인이 변경되어서 이 부분 안쓸 것 같습니다 ㅎㅎㅎㅎㅎ,,,, ㅋㅋㅎㅋ
다음 작업 때 아예 없어지고 변경될 예정이에요!
endmoseung
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.
역시 워터코드는 수준이 높아 확인했습니다~
| }: CalendarProps) { | ||
| const calendarRef = useClickOutside<HTMLDivElement>(() => { | ||
| setIsOpenCalendar(false) | ||
| }) |
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.
아 달력도 모달처럼 외부클릭하면 닫히나보네용 훅잘쓴거같아용!
|
|
||
| if (isLoading) { | ||
| return <></> | ||
| } |
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.
여기도 저희 나중에 공통적으로 로딩 컴포넌트를 처리하면 좋을것같아요
| <MemoryRecord /> | ||
| </div> | ||
| {isOpenCalendar && ( | ||
| <Calendar monthYear={monthYear} setIsOpenCalendar={setIsOpenCalendar} /> |
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.
이거 보니까 Calender에서는 setIsOpenCalendar를 true로 해주는 경우가 없더라고요.
생각해보면 캘린더 안에서는 캘린더를 끄는경우밖에 없으니 차라리 closeCalendar={()=>setIsOpenCalendar(false)}를 넘겨주는건 어떨까요
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.
넵넵 그렇게 해도 좋을 것 같아요
| setIsOpenCalendar: Dispatch<SetStateAction<boolean>> | ||
| } | ||
|
|
||
| export default function MyRecordCalendar({ |
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.
이부분 워터가 추상화하신 이유가 있다면 현상유지 아니라면 저도 세인트 의견에 동감
작업 내용
참고 이미지(선택)
어떤 점을 리뷰 받고 싶으신가요?