mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-08-24 20:34:05 +02:00
Add a typed platform package to decouple the frontend from Tauri (#539)
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
0068be9ffc
commit
2383f06e71
@@ -1,5 +1,5 @@
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
import { getCurrentWebviewWindow } from "@tauri-apps/api/webviewWindow";
|
||||
import { platform } from "@yaakapp-internal/platform";
|
||||
import { useWindowSize } from "react-use";
|
||||
import { useDebouncedValue } from "./useDebouncedValue";
|
||||
|
||||
@@ -15,7 +15,7 @@ export function useIsFullscreen() {
|
||||
useQuery({
|
||||
queryKey: ["is_fullscreen", debouncedWindowWidth],
|
||||
queryFn: async () => {
|
||||
return getCurrentWebviewWindow().isFullscreen();
|
||||
return platform.window.isFullscreen();
|
||||
},
|
||||
}).data ?? false
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user