Skip to content

Commit fbe3be0

Browse files
committed
refactor: add type
1 parent 3f31e14 commit fbe3be0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { useQuery } from '@tanstack/react-query';
2-
import type { GetArticlesProps } from '@/types/article';
2+
import type { GetArticleResponse, GetArticlesProps } from '@/types/article';
33
import { getArticles } from '../api/article.service';
44

55
export const useArticlesQuery = (params: GetArticlesProps) =>
6-
useQuery(['getArticles', { params }], async () => {
6+
useQuery<GetArticleResponse>(['getArticles', { params }], async () => {
77
const res = await getArticles(params);
88
return res;
99
});

0 commit comments

Comments
 (0)