about summary refs log tree commit diff
path: root/client/src/Components/CopyButton.js
diff options
context:
space:
mode:
authorMelonai <einebeere@gmail.com>2021-01-20 23:18:09 +0100
committerMelonai <einebeere@gmail.com>2021-01-20 23:18:09 +0100
commit826c7c47785ee01d2b9267919132ada696425344 (patch)
tree901cc90be9a953a6c3f968b6c1abe33cc13774b4 /client/src/Components/CopyButton.js
parent2953dec527cedaabaa5f0eb48637c5ddd4a4103b (diff)
downloadshorest-826c7c47785ee01d2b9267919132ada696425344.tar.zst
shorest-826c7c47785ee01d2b9267919132ada696425344.zip
Remade the client in SvelteKit
Diffstat (limited to 'client/src/Components/CopyButton.js')
-rw-r--r--client/src/Components/CopyButton.js24
1 files changed, 0 insertions, 24 deletions
diff --git a/client/src/Components/CopyButton.js b/client/src/Components/CopyButton.js
deleted file mode 100644
index 65c4cb9..0000000
--- a/client/src/Components/CopyButton.js
+++ /dev/null
@@ -1,24 +0,0 @@
-import React, {useState} from 'react';
-import copy from 'clipboard-copy';
-
-function CopyButton(props) {
-    const [copied, setCopied] = useState(false);
-
-    const handleClick = async () => {
-        await copy("https://sho.rest/" + props.hash);
-        setCopied(true);
-    };
-
-    let content;
-    if (copied) {
-        content = <span>Link Copied!</span>;
-    } else {
-        content = <strong>Copy Link</strong>;
-    }
-
-    return (
-        <span className="copy-text right-item" onClick={handleClick}>{content}</span>
-    )
-}
-
-export default CopyButton;
\ No newline at end of file