Add more info to settings

This commit is contained in:
Gregory Schier
2024-02-17 11:04:19 -08:00
parent 72971bb9ec
commit 40dfc8b30a
14 changed files with 53 additions and 28 deletions

View File

@@ -0,0 +1,10 @@
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 };
});
}