refactor: 불필요한 훅 제거

This commit is contained in:
jhynsoo 2024-07-23 12:51:53 +09:00
parent 2a7b8a475a
commit ff33cdc15c
3 changed files with 0 additions and 36 deletions

View File

@ -1,12 +0,0 @@
import { useQuery } from '@tanstack/react-query';
import instance from '../../utils/axios/instance';
import { API_URL } from '../../constants';
export function useNotice({ lectureId, noticeId }) {
const response = useQuery({
queryKey: ['notice', lectureId, noticeId],
queryFn: instance.get(`${API_URL}/notice/${lectureId}/${noticeId}`),
});
return response;
}

View File

@ -1,12 +0,0 @@
import { useQuery } from '@tanstack/react-query';
import instance from '../../utils/axios/instance';
import { API_URL } from '../../constants';
export function useQuestion({ lectureId, qusetionId }) {
const response = useQuery({
queryKey: ['question', lectureId, qusetionId],
queryFn: instance.get(`${API_URL}/qna/${lectureId}/${qusetionId}`),
});
return response;
}

View File

@ -1,12 +0,0 @@
import { useQuery } from '@tanstack/react-query';
import instance from '../../utils/axios/instance';
import { API_URL } from '../../constants';
export function useQuestions(lectureId) {
const response = useQuery({
queryKey: ['questionlist', lectureId],
queryFn: instance.get(`${API_URL}/qna/${lectureId}`),
});
return response;
}