From 9f83b2b8ad566ee0a8afb7cbd7cce9f973803560 Mon Sep 17 00:00:00 2001 From: Kendrick Wong Date: Thu, 20 Jun 2024 10:44:28 -0400 Subject: [PATCH] fix: (useCopyToClipboard): copyToClipboard should return promise Fixes #312 --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index f6e4fe2..1d40223 100644 --- a/index.js +++ b/index.js @@ -157,7 +157,7 @@ export function useCopyToClipboard() { } }; - handleCopy(); + return handleCopy(); }, []); return [state, copyToClipboard];