Template Tag Function Editor (#67)

![CleanShot 2024-08-15 at 16 53
09@2x](https://github.com/user-attachments/assets/8c0eb655-1daf-4dc8-811f-f606c770f7dc)
This commit is contained in:
Gregory Schier
2024-08-16 08:31:19 -07:00
committed by GitHub
parent a7f0fadeae
commit aa85ecb618
62 changed files with 1339 additions and 437 deletions

View File

@@ -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;
}