-
Notifications
You must be signed in to change notification settings - Fork 1
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 ] 알림 목록 조회 API 연결 및 알람 드롭다운 UI 일부 수정 #208
Conversation
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.
깔끔하네요! 수고하셨습니다 LGTM! 리뷰 한개만 확인해주세요~
import type { HTMLAttributes } from "react"; | ||
import AlarmListItem from "./AlarmListItem"; | ||
|
||
type AlarmProps = HTMLAttributes<HTMLUListElement>; | ||
interface AlarmProps extends HTMLAttributes<HTMLUListElement> { | ||
alarmList: NotificationItem[]; |
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.
notificationList 로 네이밍 맞추는 게 어떨까요 ? 파일명도 Notification
으로 통일해주시면 감사합니다!
await queryClient.prefetchQuery({ | ||
queryKey: ["notifications"], | ||
queryFn: getNotificationList, | ||
}); |
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.
prefetchQuery
사용하는 것 배워갑니다! 좋은 코드 감사합니다 :)
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.
svg명까지 변경된게 있어서 그 부분만 수정해서 커밋해두었습니다! merge 해도 좋을 듯 해용 수고하셨습니다 :)
#️⃣ Related Issue
Closes #207
✅ Done Task
💎 PR Point
getNotificationList
api 작성해주었고, 이에 따른 query 또한 생성해주었습니다.쿼리를 사용할 때
Header
는 서버 컴포넌트로 활용 가능하기 때문에, 상위에서prefetch
해주고,UserMenu
에서는 해당 캐시를 쿼리로부터 빠르게 가져올 수 있도록hydration
적용해주었습니다.또한 알람 드롭다운 스타일을 일부 수정하였는데, 패딩값 조정하고
overscrollBehavior
적용해주어 포인터가 드롭다운 위에 있을 때는 끝까지 내려도 뒤 백그라운드가 스크롤되지 않도록 설정하였습니다.알림 읽음 api는 수정이 필요할 것 같아서, 서버에서 완료되면 그 때 다시 반영하겠습니다.
📸 Screenshot
2024-11-19.12.28.39.mov