mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-19 07:29:40 +02:00
Clean up model fetching and loading states
This commit is contained in:
@@ -3,10 +3,9 @@ import { useSetAtom } from 'jotai';
|
||||
import { InlineCode } from '../components/core/InlineCode';
|
||||
import { trackEvent } from '../lib/analytics';
|
||||
import { showConfirm } from '../lib/confirm';
|
||||
import { getFolder } from '../lib/store';
|
||||
import { invokeCmd } from '../lib/tauri';
|
||||
import { useFastMutation } from './useFastMutation';
|
||||
import { foldersAtom } from './useFolders';
|
||||
import {foldersAtom, getFolder} from './useFolders';
|
||||
import { removeModelById } from './useSyncModelStores';
|
||||
|
||||
export function useDeleteFolder(id: string | null) {
|
||||
@@ -15,7 +14,7 @@ export function useDeleteFolder(id: string | null) {
|
||||
return useFastMutation<Folder | null, string>({
|
||||
mutationKey: ['delete_folder', id],
|
||||
mutationFn: async () => {
|
||||
const folder = await getFolder(id);
|
||||
const folder = getFolder(id);
|
||||
const confirmed = await showConfirm({
|
||||
id: 'delete-folder',
|
||||
title: 'Delete Folder',
|
||||
|
||||
Reference in New Issue
Block a user