Switch to useMutation in some places

This commit is contained in:
Gregory Schier
2024-12-20 17:38:41 -08:00
parent 27134a52ad
commit 51a11b6495
48 changed files with 98 additions and 99 deletions

View File

@@ -1,4 +1,4 @@
import { useMutation } from './useMutation';
import { useFastMutation } from './useFastMutation';
import type { CookieJar } from '@yaakapp-internal/models';
import { useSetAtom } from 'jotai/index';
import { getCookieJar } from '../lib/store';
@@ -8,7 +8,7 @@ import { updateModelList } from './useSyncModelStores';
export function useUpdateCookieJar(id: string | null) {
const setCookieJars = useSetAtom(cookieJarsAtom);
return useMutation<CookieJar, unknown, Partial<CookieJar> | ((j: CookieJar) => CookieJar)>({
return useFastMutation<CookieJar, unknown, Partial<CookieJar> | ((j: CookieJar) => CookieJar)>({
mutationKey: ['update_cookie_jar', id],
mutationFn: async (v) => {
const cookieJar = await getCookieJar(id);