mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-01-18 17:47:37 +01:00
11 lines
353 B
TypeScript
11 lines
353 B
TypeScript
import { useQuery } from '@tanstack/react-query';
|
|
import * as app from '@tauri-apps/api/app';
|
|
import * as path from '@tauri-apps/api/path';
|
|
|
|
export function useAppInfo() {
|
|
return useQuery(['appInfo'], async () => {
|
|
const [version, appDataDir] = await Promise.all([app.getVersion(), path.appDataDir()]);
|
|
return { version, appDataDir };
|
|
});
|
|
}
|