fix copy interaction

Closes #1258
main
Mike Fix 3 years ago
parent 3545c2dd92
commit e3a2d72f7e
No known key found for this signature in database
GPG Key ID: 1D85E862314CA79F

@ -37,7 +37,7 @@ function CopyButton(props) {
function CopyEmbed({ mapper, title }) {
const { asPath } = useRouter()
const text = React.useMemo(() => mapper(asPath), [mapper, asPath])
const { onClick, copied } = useCopyTextHandler(text)
const { onClick, copied } = useCopyTextHandler(text, { interval: 1000 })
return <CopyButton onClick={onClick}>{copied ? 'Copied!' : title}</CopyButton>
}

Loading…
Cancel
Save