mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-01-14 13:13:31 +01:00
12 lines
342 B
TypeScript
12 lines
342 B
TypeScript
import { invokeCmd } from '../lib/tauri';
|
|
import { useFastMutation } from './useFastMutation';
|
|
|
|
export function useInstallPlugin() {
|
|
return useFastMutation<void, unknown, string>({
|
|
mutationKey: ['install_plugin'],
|
|
mutationFn: async (directory: string) => {
|
|
await invokeCmd('cmd_install_plugin', { directory });
|
|
},
|
|
});
|
|
}
|