mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-02-23 02:54:58 +01:00
14 lines
322 B
TypeScript
14 lines
322 B
TypeScript
import { useQuery } from '@tanstack/react-query';
|
|
import { invoke } from '@tauri-apps/api';
|
|
|
|
export function useAppInfo() {
|
|
return useQuery(['appInfo'], async () => {
|
|
return (await invoke('cmd_metadata')) as {
|
|
isDev: boolean;
|
|
version: string;
|
|
name: string;
|
|
appDataDir: string;
|
|
};
|
|
});
|
|
}
|