mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-11 03:36:49 +02:00
Template Tag Function Editor (#67)

This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import { useQuery } from '@tanstack/react-query';
|
||||
import { invokeCmd } from '../lib/tauri';
|
||||
|
||||
export interface AppInfo {
|
||||
@@ -9,12 +8,8 @@ export interface AppInfo {
|
||||
appLogDir: string;
|
||||
}
|
||||
|
||||
const appInfo = (await invokeCmd('cmd_metadata')) as AppInfo;
|
||||
|
||||
export function useAppInfo() {
|
||||
return useQuery({
|
||||
queryKey: ['appInfo'],
|
||||
queryFn: async () => {
|
||||
const metadata = await invokeCmd('cmd_metadata');
|
||||
return metadata as AppInfo;
|
||||
},
|
||||
}).data;
|
||||
return appInfo;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user