snapshot of https://github.com/mountain-loop/yaak.git (main, 2026-09-23; blobs > 131072B omitted)
This commit is contained in:
14
crates-tauri/yaak-fonts/index.ts
Normal file
14
crates-tauri/yaak-fonts/index.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
import { platform } from "@yaakapp-internal/platform";
|
||||
import { Fonts } from "./bindings/gen_fonts";
|
||||
|
||||
export async function listFonts() {
|
||||
return platform.rpc<Fonts>("plugin:yaak-fonts|list", {});
|
||||
}
|
||||
|
||||
export function useFonts() {
|
||||
return useQuery({
|
||||
queryKey: ["list_fonts"],
|
||||
queryFn: () => listFonts(),
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user