Skip to content

Commit

Permalink
fix(qa) QA에서 발견된 오류 수정 (#58)
Browse files Browse the repository at this point in the history
* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* f

* fix

* fix
  • Loading branch information
Collection50 authored and eunbeann committed Aug 30, 2024
1 parent 74fb1b5 commit 6326f25
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/app/(sidebar)/write/[id]/api/usePostMemo.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { http } from '@/apis/http';
import { useMutation } from '@tanstack/react-query';
import { useMutation, useQueryClient } from '@tanstack/react-query';

export const postMemo = (cardId: number, content: string) =>
http.post({
Expand All @@ -8,8 +8,13 @@ export const postMemo = (cardId: number, content: string) =>
});

export const usePostMemo = (cardId: number) => {
const queryClient = useQueryClient();

return useMutation({
mutationKey: ['post-memo', cardId],
mutationFn: (content: string) => postMemo(cardId, content),
onSuccess: async () => {
await queryClient.invalidateQueries({ queryKey: ['get-memos'] });
},
});
};
1 change: 1 addition & 0 deletions src/system/components/Icon/Icon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ const iconMap = {
folder: Folder,
announcementFolder: AnnouncementFolder,
warning: Warning,
announcementFolder: AnnouncementFolder,
} as const;

export interface IconProps extends IconBaseType {
Expand Down

0 comments on commit 6326f25

Please sign in to comment.