refactor: 불필요한 훅 제거
This commit is contained in:
parent
2a7b8a475a
commit
ff33cdc15c
@ -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;
|
||||
}
|
@ -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;
|
||||
}
|
@ -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;
|
||||
}
|
Loading…
Reference in New Issue
Block a user