mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-17 23:13:51 +01:00
14 lines
337 B
TypeScript
14 lines
337 B
TypeScript
import { useQuery } from '@tanstack/react-query';
|
|
import { readText } from '@tauri-apps/plugin-clipboard-manager';
|
|
|
|
export function useClipboardText() {
|
|
return useQuery({
|
|
queryKey: [],
|
|
queryFn: async () => {
|
|
const text = await readText();
|
|
console.log('READ CLIPBOARD', text);
|
|
return text;
|
|
},
|
|
}).data;
|
|
}
|