-
Notifications
You must be signed in to change notification settings - Fork 4
my-profile 페이지네이션/알림 모달 연동 #88
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
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
1ba6250
✨ feat: 신청 내역 로드 로직 개선 및 에러 처리 추가
jeschun eb7f03a
✨ feat: 알림 기능 추가 및 프로필 상태 확인 로직 개선
jeschun c73bbfc
✨ feat: 페이지네이션, 알림 모달창, table 연결 및 프로필 페이지네이션 UX 개선
jeschun 6989504
✨ feat: 알림 기능 추가 및 서버 알림 로드 로직 구현
jeschun 7c4eccb
이전 nav
jeschun aee6706
Merge remote-tracking branch 'upstream/develop' into ShinCheon
jeschun 8a5f2a2
Merge branch 'codeit-FE18-part3:develop' into ShinCheon
jeschun File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| // src/api/alerts.ts | ||
| import axios from '@/lib/axios'; | ||
| import type { ApiResponse, PaginatedResponse } from '@/types/api'; | ||
| import type { Notice } from '@/types/notice'; | ||
| import type { Shop } from '@/types/shop'; | ||
|
|
||
| // 서버 응답에 맞춘 타입 | ||
| export type AlertItem = { | ||
| id: string; | ||
| createdAt: string; | ||
| result: 'accepted' | 'rejected'; | ||
| read: boolean; | ||
| application: { item: { id: string; status: 'pending' | 'accepted' | 'rejected' } }; | ||
| shop: { item: Shop }; | ||
| notice: { item: Notice }; | ||
| }; | ||
|
|
||
| export async function getUserAlerts(userId: string, params?: { offset?: number; limit?: number }) { | ||
| const { data } = await axios.get<PaginatedResponse & { items: ApiResponse<AlertItem>[] }>( | ||
| `/users/${userId}/alerts`, | ||
| { params } | ||
| ); | ||
| return data; | ||
| } | ||
|
|
||
| export async function markAlertRead(userId: string, alertId: string) { | ||
| // PUT /users/{user_id}/alerts/{alert_id} (Body 없이 호출해도 OK) | ||
| const { data } = await axios.put<{ item: AlertItem }>(`/users/${userId}/alerts/${alertId}`); | ||
| return data.item; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. table 컴포넌트를 인화님도 수정하신 상태여서 PR merge 후 재 push 부탁드립니다 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 이 페이지에서는 디스코드에서 나왔던 유저 권한에 따른 리다이렉트 화면이 필요해보입니다 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
혹시 컴포넌트의 컬러를 var-- 형태로 변환하신 이유가 있으실까요 ?
왜냐면 기존과 동일한 문법인데 바꾸신 이유가 있을까 해서요!