mirror of
https://github.com/aljazceru/mutiny-web.git
synced 2026-01-29 11:04:20 +01:00
catch paste errors
This commit is contained in:
committed by
Tony Giorgio
parent
97d9d9969e
commit
81d45874fd
@@ -10,7 +10,7 @@ export const useCopy = ({ copiedTimeout = 2000 }: UseCopyProps = {}): [
|
||||
copied: Accessor<boolean>
|
||||
] => {
|
||||
const [copied, setCopied] = createSignal(false);
|
||||
let timeout: NodeJS.Timeout;
|
||||
let timeout: number;
|
||||
const copy: CopyFn = async (text) => {
|
||||
await navigator.clipboard.writeText(text);
|
||||
setCopied(true);
|
||||
|
||||
Reference in New Issue
Block a user