-
Notifications
You must be signed in to change notification settings - Fork 2
Fix(audience): 공지 저장 뷰 이미지 오류 해결 #339
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
3 commits
Select commit
Hold shift + click to select a range
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
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
15 changes: 4 additions & 11 deletions
15
...rc/shared/types/saved-notices-response.ts → ...dience/src/entities/notice/types/types.ts
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 |
|---|---|---|
| @@ -1,23 +1,16 @@ | ||
| import type { Pagination } from '@shared/types'; | ||
|
|
||
| export interface SavedNoticeItem { | ||
| savedNoticeId: number; | ||
| noticeId: number; | ||
| festivalTitle: string; | ||
| categoryName: string; | ||
| content: string; | ||
| title: string; | ||
| imageUrl: string; | ||
| } | ||
|
|
||
| export interface SavedNoticesPagination { | ||
| currentPage: number; | ||
| totalPages: number; | ||
| totalElements: number; | ||
| size: number; | ||
| hasNext: boolean; | ||
| hasPrevious: boolean; | ||
| imageUrls: string[]; | ||
| } | ||
|
|
||
| export interface SavedNoticesResponse { | ||
| notices: SavedNoticeItem[]; | ||
| pagination: SavedNoticesPagination; | ||
| pagination: Pagination; | ||
| } |
This file was deleted.
Oops, something went wrong.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| export * from './pagination'; |
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,8 @@ | ||
| export interface Pagination { | ||
| currentPage: number; | ||
| totalPages: number; | ||
| totalElements: number; | ||
| size: number; | ||
| hasNext: boolean; | ||
| hasPrevious: boolean; | ||
| } |
Oops, something went wrong.
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.
🧹 Nitpick | 🔵 Trivial
Suggest: AbortSignal 지원 추가를 고려해보세요.
NOTICES_QUERY_OPTIONS.LIST는signal을 전달해서 요청 취소를 지원하는데,SAVED_NOTICES_QUERY_OPTIONS.LIST는 signal을 전달하지 않아요. 사용자가 페이지를 빠르게 이탈할 때 불필요한 네트워크 요청이 계속될 수 있어요.현재
getSavedNotices함수가 options를 받지 않아서 signal을 전달할 수 없는 구조인데, 일관성과 UX 개선을 위해 추후 리팩토링 시 고려해주시면 좋을 것 같아요.♻️ 제안하는 수정 방향 (notice.ts와 query-options.ts 둘 다 수정 필요)
notice.ts:
query-options.ts:
export const SAVED_NOTICES_QUERY_OPTIONS = { LIST: (params: PageSizeParams = {}) => queryOptions({ queryKey: [...USERS_QUERY_KEY.SAVED_NOTICES(), params], - queryFn: () => getSavedNotices(params), + queryFn: ({ signal }) => getSavedNotices(params, { signal }), }), } as const;🤖 Prompt for AI Agents