useDeleteNote
Hook for deleting a note.
import type {
UseMutationResult,
UseMutationOptions,
} from "@tanstack/react-query";
import type { NoteEntity } from "crossbell";
function useDeleteNote(
options?: UseMutationOptions
): UseMutationResult<
unknown,
unknown,
Pick<NoteEntity, "noteId" | "characterId">
>;
Usage
import { useDeleteNote } from "@crossbell/connect-kit";
// https://xfeed.app/notes/32179-30
const note = { characterId: 32179, noteId: 30 };
function App() {
const deleteNote = useDeleteNote();
return (
<button
onClick={() => {
deleteNote.mutate(note);
}}
>
Delete Note
</button>
);
}