Adding LinkClicked to the copy button

This commit is contained in:
pierrbt
2023-06-22 22:40:43 +02:00
parent db755ef300
commit 61608cfe2d

View File

@@ -35,6 +35,7 @@ const Body = ({ share, appUrl }: { share: Share; appUrl: string }) => {
<TextInput <TextInput
readOnly readOnly
variant="filled" variant="filled"
style={{ borderColor: "green" }}
value={link} value={link}
onClick={() => { onClick={() => {
if (linkClicked) return; if (linkClicked) return;
@@ -48,6 +49,7 @@ const Body = ({ share, appUrl }: { share: Share; appUrl: string }) => {
onClick={() => { onClick={() => {
clipboard.copy(link); clipboard.copy(link);
toast.success("Your link was copied to the keyboard."); toast.success("Your link was copied to the keyboard.");
setLinkClicked(true);
}} }}
> >
<TbCopy /> <TbCopy />