training_data/packages/client/src/api/hooks/usePost.ts

13 lines
435 B
TypeScript
Raw Normal View History

2025-02-06 16:32:52 +08:00
import { useQueryClient } from "@tanstack/react-query";
import { getQueryKey } from "@trpc/react-query";
import { MutationResult, useEntity } from "./useEntity";
import { ObjectType } from "@nice/common";
2024-12-30 08:26:40 +08:00
import { api } from "../trpc";
2025-02-06 16:32:52 +08:00
import { CrudOperation, emitDataChange } from "../../event";
2024-12-30 08:26:40 +08:00
export function usePost() {
2025-02-06 16:32:52 +08:00
const queryClient = useQueryClient();
const queryKey = getQueryKey(api.post);
return useEntity("post");
2024-12-30 08:26:40 +08:00
}