-
Notifications
You must be signed in to change notification settings - Fork 0
[FIX] 9월 3주차 QA 사항 - 희용 #253
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
Changes from all commits
d793f26
6799046
a4bc099
5e8644b
f7f1e7f
8ca08c9
ef77c7f
bf0eb68
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| import { apiClient } from '../index'; | ||
|
|
||
| export interface NotificationItem { | ||
| notificationId: number; | ||
| title: string; | ||
| content: string; | ||
| isChecked: boolean; | ||
| notificationType: string; | ||
| postDate: string; | ||
| } | ||
|
|
||
| export interface GetNotificationsResponse { | ||
| isSuccess: boolean; | ||
| code: number; | ||
| message: string; | ||
| data: { | ||
| notifications: NotificationItem[]; | ||
| nextCursor: string; | ||
| isLast: boolean; | ||
| }; | ||
| } | ||
|
|
||
| export interface GetNotificationsParams { | ||
| cursor?: string | null; | ||
| type?: 'feed' | 'room'; | ||
| } | ||
|
|
||
| export const getNotifications = async ( | ||
| params?: GetNotificationsParams, | ||
| ): Promise<GetNotificationsResponse> => { | ||
| const response = await apiClient.get<GetNotificationsResponse>('/notifications', { | ||
| params, | ||
| }); | ||
| return response.data; | ||
| }; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| import { apiClient } from '../index'; | ||
|
|
||
| export interface DeleteUsersResponse { | ||
| isSuccess: boolean; | ||
| code: number; | ||
| message: string; | ||
| data: null; | ||
| } | ||
|
|
||
| export const deleteUsers = async (): Promise<DeleteUsersResponse> => { | ||
| const response = await apiClient.delete<DeleteUsersResponse>('/users'); | ||
| return response.data; | ||
| }; |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -8,12 +8,14 @@ import { Modal, Overlay } from './Modal.styles'; | |||||||||||||||||||||||||||||||||||
| import { getMyRooms, type Room } from '@/api/rooms/getMyRooms'; | ||||||||||||||||||||||||||||||||||||
| import { getMyProfile } from '@/api/users/getMyProfile'; | ||||||||||||||||||||||||||||||||||||
| import { colors, typography } from '@/styles/global/global'; | ||||||||||||||||||||||||||||||||||||
| import { useNavigate } from 'react-router-dom'; | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| interface CompletedGroupModalProps { | ||||||||||||||||||||||||||||||||||||
| onClose: () => void; | ||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| const CompletedGroupModal = ({ onClose }: CompletedGroupModalProps) => { | ||||||||||||||||||||||||||||||||||||
| const navigate = useNavigate(); | ||||||||||||||||||||||||||||||||||||
| const [rooms, setRooms] = useState<Room[]>([]); | ||||||||||||||||||||||||||||||||||||
| const [isLoading, setIsLoading] = useState(false); | ||||||||||||||||||||||||||||||||||||
| const [error, setError] = useState<string | null>(null); | ||||||||||||||||||||||||||||||||||||
|
|
@@ -29,9 +31,14 @@ const CompletedGroupModal = ({ onClose }: CompletedGroupModalProps) => { | |||||||||||||||||||||||||||||||||||
| coverUrl: room.bookImageUrl, | ||||||||||||||||||||||||||||||||||||
| deadLine: '', | ||||||||||||||||||||||||||||||||||||
| isOnGoing: false, | ||||||||||||||||||||||||||||||||||||
| type: room.type, | ||||||||||||||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| const handleGroupCardClick = (group: Group) => { | ||||||||||||||||||||||||||||||||||||
| navigate(`/group/detail/joined/${group.id}`); | ||||||||||||||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| useEffect(() => { | ||||||||||||||||||||||||||||||||||||
| const fetchCompletedRooms = async () => { | ||||||||||||||||||||||||||||||||||||
| try { | ||||||||||||||||||||||||||||||||||||
|
|
@@ -84,7 +91,14 @@ const CompletedGroupModal = ({ onClose }: CompletedGroupModalProps) => { | |||||||||||||||||||||||||||||||||||
| ) : error ? ( | ||||||||||||||||||||||||||||||||||||
| <ErrorMessage>{error}</ErrorMessage> | ||||||||||||||||||||||||||||||||||||
| ) : convertedGroups.length > 0 ? ( | ||||||||||||||||||||||||||||||||||||
| convertedGroups.map(group => <GroupCard key={group.id} group={group} type={'modal'} />) | ||||||||||||||||||||||||||||||||||||
| convertedGroups.map(group => ( | ||||||||||||||||||||||||||||||||||||
| <GroupCard | ||||||||||||||||||||||||||||||||||||
| key={group.id} | ||||||||||||||||||||||||||||||||||||
| group={group} | ||||||||||||||||||||||||||||||||||||
| type={'modal'} | ||||||||||||||||||||||||||||||||||||
| onClick={() => handleGroupCardClick(group)} | ||||||||||||||||||||||||||||||||||||
| /> | ||||||||||||||||||||||||||||||||||||
| )) | ||||||||||||||||||||||||||||||||||||
|
Comment on lines
+94
to
+101
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. 완료된 방 라벨 오표기 가능성 — isOngoing 전달 필요
적용 diff: <GroupCard
key={group.id}
group={group}
type={'modal'}
- onClick={() => handleGroupCardClick(group)}
+ isOngoing={true}
+ onClick={() => handleGroupCardClick(group)}
/>참고: 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||
| ) : ( | ||||||||||||||||||||||||||||||||||||
| <EmptyState data-empty="true"> | ||||||||||||||||||||||||||||||||||||
| <EmptyTitle>완료된 모임방이 없어요</EmptyTitle> | ||||||||||||||||||||||||||||||||||||
|
|
@@ -116,6 +130,11 @@ const Content = styled.div<{ isEmpty?: boolean }>` | |||||||||||||||||||||||||||||||||||
| @media (min-width: 584px) { | ||||||||||||||||||||||||||||||||||||
| grid-template-columns: 1fr 1fr; | ||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| //항목이 하나일 때는 전체 열을 사용하여 2열 그리드처럼 보이지 않도록 처리 | ||||||||||||||||||||||||||||||||||||
| & > *:only-child { | ||||||||||||||||||||||||||||||||||||
| grid-column: 1 / -1; | ||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||
| `; | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| const LoadingMessage = styled.div` | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
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.
null 파라미터 전송 차단: cursor=null 이 쿼리스트링에 노출될 수 있습니다
Axios가 객체를 직렬화할 때 null이 문자열 "null"로 전송될 수 있어 서버 필터링/캐싱에 악영향을 줄 수 있습니다. null/빈값은 아예 파라미터에서 제거하세요.
다음처럼 쿼리 객체를 정제해 전송하십시오:
export const getNotifications = async ( params?: GetNotificationsParams, ): Promise<GetNotificationsResponse> => { - const response = await apiClient.get<GetNotificationsResponse>('/notifications', { - params, - }); + const { cursor, type } = params ?? {}; + const query: Record<string, string> = {}; + if (cursor) query.cursor = cursor; + if (type) query.type = type; + const response = await apiClient.get<GetNotificationsResponse>('/notifications', { + params: query, + }); return response.data; };📝 Committable suggestion
🤖 Prompt for AI Agents