Files
multica/packages/core/feedback/mutations.ts
Ryan Yu 03828015ca fix(feedback): validate response and pass error kind (#4633)
Wire structured feedback kind through the frontend/core feedback path so desktop route-renderer errors submit as bug feedback, and bring the feedback client onto parseWithFallback. MUL-3768
2026-07-02 16:26:42 +08:00

17 lines
398 B
TypeScript

import { useMutation } from "@tanstack/react-query";
import { api } from "../api";
import type { FeedbackKind } from "./types";
export interface CreateFeedbackInput {
message: string;
url?: string;
workspace_id?: string;
kind?: FeedbackKind;
}
export function useCreateFeedback() {
return useMutation({
mutationFn: (input: CreateFeedbackInput) => api.createFeedback(input),
});
}