mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-05-13 19:30:29 +02:00
Split codebase (#455)
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