fix: avoid extra new line when copying

This commit is contained in:
Timothy Lin committed 2021-09-08 22:09:31 +08:00
1 parent aed6d7782d
commit 55e8c442d1
3 files changed
+5 -5

No files matched your search

+1 -1
View File
@@ -14,7 +14,7 @@ const Pre = (props) => {
}
const onCopy = () => {
setCopied(true)
navigator.clipboard.writeText(textInput.current.innerText)
navigator.clipboard.writeText(textInput.current.textContent)
setTimeout(() => {
setCopied(false)
}, 2000)