Toast component and use for copy-as-curl

This commit is contained in:
Gregory Schier
2024-05-10 12:37:04 -07:00
parent b533a01677
commit 582da26574
14 changed files with 285 additions and 101 deletions

View File

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