mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-15 14:22:14 +00:00
copy function
This commit is contained in:
1 parent
3866423be3
commit
f167ec0627
1 file changed
+7
-2
@@ -187,6 +187,11 @@ function ProfileFc(props: Props) {
|
||||
profileRows.push(<div key="twitter">{twitterLink}</div>);
|
||||
}
|
||||
|
||||
function copyToClipboard(username: string): void {
|
||||
navigator.clipboard.writeText(username);
|
||||
alert("Copied the text: " + copyText);
|
||||
}
|
||||
|
||||
if (userData.discord_username) {
|
||||
profileRows.push(
|
||||
<Tippy
|
||||
@@ -198,9 +203,9 @@ function ProfileFc(props: Props) {
|
||||
</span>
|
||||
}
|
||||
>
|
||||
<Link to="#">
|
||||
<a href="/" onclick="copyToClipboard(userData.discord_username)">
|
||||
<FontAwesomeIcon icon={faDiscord} />
|
||||
</Link>
|
||||
</a>
|
||||
</Tippy>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user