We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3f31e14 commit fbe3be0Copy full SHA for fbe3be0
src/services/queries/article.query.ts
@@ -1,9 +1,9 @@
1
import { useQuery } from '@tanstack/react-query';
2
-import type { GetArticlesProps } from '@/types/article';
+import type { GetArticleResponse, GetArticlesProps } from '@/types/article';
3
import { getArticles } from '../api/article.service';
4
5
export const useArticlesQuery = (params: GetArticlesProps) =>
6
- useQuery(['getArticles', { params }], async () => {
+ useQuery<GetArticleResponse>(['getArticles', { params }], async () => {
7
const res = await getArticles(params);
8
return res;
9
});
0 commit comments