1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 01:47:00 +01:00

fix(clipboard): Increase DEFAULT copy to clipboard time (#20008)

This commit is contained in:
Howard Braham 2023-07-13 13:49:13 -07:00 committed by GitHub
parent 0917b7c52f
commit 3ef2faf41c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,6 +1,6 @@
import { useState, useCallback } from 'react';
import copyToClipboard from 'copy-to-clipboard';
import { SECOND } from '../../shared/constants/time';
import { MINUTE } from '../../shared/constants/time';
import { useTimeout } from './useTimeout';
/**
@ -9,7 +9,7 @@ import { useTimeout } from './useTimeout';
* @param {number} [delay=3000] - delay in ms
* @returns {[boolean, Function]}
*/
const DEFAULT_DELAY = SECOND * 3;
const DEFAULT_DELAY = MINUTE;
export function useCopyToClipboard(delay = DEFAULT_DELAY) {
const [copied, setCopied] = useState(false);