mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-05 08:47:05 +02:00
Refactor desktop app into separate client and proxy apps
This commit is contained in:
11
apps/yaak-client/hooks/useInstallPlugin.ts
Normal file
11
apps/yaak-client/hooks/useInstallPlugin.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import { installPluginFromDirectory } from '@yaakapp-internal/plugins';
|
||||
import { useFastMutation } from './useFastMutation';
|
||||
|
||||
export function useInstallPlugin() {
|
||||
return useFastMutation<void, unknown, string>({
|
||||
mutationKey: ['install_plugin'],
|
||||
mutationFn: async (directory: string) => {
|
||||
await installPluginFromDirectory(directory);
|
||||
},
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user