Add create/update playlist mutations and form

This commit is contained in:
jeffvli 2022-12-31 12:40:11 -08:00
parent 82f107d835
commit 88f53c17db
11 changed files with 409 additions and 145 deletions

View file

@ -1,4 +1,4 @@
import type { UseQueryOptions, DefaultOptions } from '@tanstack/react-query';
import type { UseQueryOptions, DefaultOptions, UseMutationOptions } from '@tanstack/react-query';
import { QueryClient, QueryCache } from '@tanstack/react-query';
import { toast } from '/@/renderer/components';
@ -49,3 +49,13 @@ export type QueryOptions = {
suspense?: UseQueryOptions['suspense'];
useErrorBoundary?: boolean;
};
export type MutationOptions = {
mutationKey: UseMutationOptions['mutationKey'];
onError?: (err: any) => void;
onSettled?: any;
onSuccess?: any;
retry?: UseQueryOptions['retry'];
retryDelay?: UseQueryOptions['retryDelay'];
useErrorBoundary?: boolean;
};