mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-11-18 22:48:23 +01:00
Cross platform window controls
This commit is contained in:
1 parent
8dfd3579e4
commit
2a4889bc01
7 files changed
+39
-5
No files matched your search
@@ -0,0 +1,12 @@
|
||||
import { useQuery } from '@tanstack/react-query';
|
||||
import type { OsType } from '@tauri-apps/api/os';
|
||||
import { type } from '@tauri-apps/api/os';
|
||||
|
||||
export function useOsInfo() {
|
||||
return useQuery<{ osType: OsType }>({
|
||||
queryKey: ['platform'],
|
||||
queryFn: async () => {
|
||||
return { osType: await type() };
|
||||
},
|
||||
}).data;
|
||||
}
|
||||
Reference in new issue
Block a user