✨ Simplify arrow function syntax and remove unnecessary whitespace across composable utilities
This commit is contained in:
@@ -18,14 +18,14 @@ export function useClipboard() {
|
||||
* @param {string} text - Text to copy
|
||||
* @returns {Promise<boolean>} Success status
|
||||
*/
|
||||
const copyToClipboard = async (text) => {
|
||||
const copyToClipboard = async text => {
|
||||
error.value = null;
|
||||
copied.value = false;
|
||||
|
||||
try {
|
||||
await navigator.clipboard.writeText(text);
|
||||
copied.value = true;
|
||||
|
||||
|
||||
// Reset after 2 seconds
|
||||
setTimeout(() => {
|
||||
copied.value = false;
|
||||
|
||||
Reference in New Issue
Block a user