16 lines
456 B
TypeScript
16 lines
456 B
TypeScript
import { useQuery } from "@tanstack/react-query";
|
|
|
|
import { ENDPOINT } from "@/shared/config";
|
|
|
|
import type { UserPostSearchParams } from "../model/post-interface";
|
|
|
|
import { postApi } from "./post-service";
|
|
|
|
export function useUserPostList(params?: UserPostSearchParams) {
|
|
return useQuery({
|
|
queryKey: [ENDPOINT.BOARD_SERVICE.POSTS, params],
|
|
queryFn: () => postApi.getUserPostList(params),
|
|
refetchOnWindowFocus: false,
|
|
});
|
|
}
|