mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-01-18 06:57:11 +01:00
14 lines
397 B
TypeScript
14 lines
397 B
TypeScript
import { useQuery } from '@tanstack/react-query';
|
|
import type { BootResponse } from '@yaakapp-internal/plugins';
|
|
import { invokeCmd } from '../lib/tauri';
|
|
|
|
export function usePluginInfo(id: string) {
|
|
return useQuery({
|
|
queryKey: ['plugin_info', id],
|
|
queryFn: async () => {
|
|
const info = (await invokeCmd('cmd_plugin_info', { id })) as BootResponse;
|
|
return info;
|
|
},
|
|
});
|
|
}
|