Skip to content

Commit

Permalink
refactor: 콜백함수 제거 및 네이밍 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
gyeongza committed Oct 10, 2023
1 parent 94c5961 commit 36d5fa3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion frontend/src/apis/apis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export const getRunnerPostDetail = (runnerPostId: number, isLogin: boolean) => {
return request.get<GetDetailedRunnerPostResponse>(`/posts/runner/${runnerPostId}`, isLogin);
};

export const getAlram = () => {
export const getNotification = () => {
return request.get<GetNotificationResponse>(`/notifications`, true);
};

Expand Down
4 changes: 2 additions & 2 deletions frontend/src/hooks/query/useNotification.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { getAlram } from '@/apis/apis';
import { getNotification } from '@/apis/apis';
import { GetNotificationResponse } from '@/types/notification';
import { APIError } from '@/types/error';
import { useSuspenseQuery } from '@tanstack/react-query';

export const useNotification = () => {
const queryResult = useSuspenseQuery<GetNotificationResponse, APIError>({
queryKey: ['notification'],
queryFn: () => getAlram(),
queryFn: getNotification,
});

return {
Expand Down

0 comments on commit 36d5fa3

Please sign in to comment.