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

[ Feat ] 알림 목록 조회 API 연결 및 알람 드롭다운 UI 일부 수정 #208

Merged
merged 4 commits into from
Nov 25, 2024

Conversation

wuzoo
Copy link
Member

@wuzoo wuzoo commented Nov 18, 2024

#️⃣ Related Issue

Closes #207

✅ Done Task

  • 알림 목록 조회 api

💎 PR Point

getNotificationList api 작성해주었고, 이에 따른 query 또한 생성해주었습니다.
쿼리를 사용할 때 Header는 서버 컴포넌트로 활용 가능하기 때문에, 상위에서 prefetch 해주고, UserMenu에서는 해당 캐시를 쿼리로부터 빠르게 가져올 수 있도록 hydration 적용해주었습니다.

또한 알람 드롭다운 스타일을 일부 수정하였는데, 패딩값 조정하고 overscrollBehavior 적용해주어 포인터가 드롭다운 위에 있을 때는 끝까지 내려도 뒤 백그라운드가 스크롤되지 않도록 설정하였습니다.

알림 읽음 api는 수정이 필요할 것 같아서, 서버에서 완료되면 그 때 다시 반영하겠습니다.

📸 Screenshot

2024-11-19.12.28.39.mov

@wuzoo wuzoo added ✨ Feat 새로운 기능 구현 WUZ 최주용 labels Nov 18, 2024
@wuzoo wuzoo self-assigned this Nov 18, 2024
Copy link
Member

@j-nary j-nary left a 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[];
Copy link
Member

Choose a reason for hiding this comment

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

notificationList 로 네이밍 맞추는 게 어떨까요 ? 파일명도 Notification 으로 통일해주시면 감사합니다!

Comment on lines +24 to +27
await queryClient.prefetchQuery({
queryKey: ["notifications"],
queryFn: getNotificationList,
});
Copy link
Member

Choose a reason for hiding this comment

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

prefetchQuery 사용하는 것 배워갑니다! 좋은 코드 감사합니다 :)

@github-actions github-actions bot added size/l and removed size/s labels Nov 20, 2024
Copy link
Member

@j-nary j-nary left a comment

Choose a reason for hiding this comment

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

svg명까지 변경된게 있어서 그 부분만 수정해서 커밋해두었습니다! merge 해도 좋을 듯 해용 수고하셨습니다 :)

@wuzoo wuzoo merged commit cdc010f into main Nov 25, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ Feat 새로운 기능 구현 size/l WUZ 최주용
Projects
None yet
Development

Successfully merging this pull request may close these issues.

알림 목록 조회 API 연결
2 participants