-
Notifications
You must be signed in to change notification settings - Fork 0
/
buttons-sharing.txt
executable file
·90 lines (84 loc) · 2.87 KB
/
buttons-sharing.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<button
onClick={() => {
const etherscanLink = `https://etherscan.io/tx/${transaction.hash}`;
const timestamp = `${transaction.timestamp}`;
const transactionData = `UTC-Date-Time: ${timestamp}\n\nFrom: ${transaction.from}\nTo: ${transaction.to}\n\nMessage: ${transaction.inputData}\n\nEtherscan: ${etherscanLink}\n\nShared from: https://blockchat.auditutils.com`;
navigator.clipboard.writeText(transactionData);
alert('Transaction data copied to clipboard!');
}}
style={{
border: "none",
background: "none",
cursor: "pointer",
marginLeft: "20px",
}}
>
<img
src="WhhCopy.svg"
alt="Copy transaction data"
style={{ height: "20px" }}
/>
</button>
<button
onClick={() => {
const etherscanLink = `https://etherscan.io/tx/${transaction.hash}`;
const timestamp = `${transaction.timestamp}`;
const transactionData = `UTC-Date-Time: ${timestamp}\n\nFrom: ${transaction.from}\nTo: ${transaction.to}\n\nMessage: ${transaction.inputData}\n\nEtherscan: ${etherscanLink}\n\nShared from: https://blockchat.auditutils.com`;
const telegramLink = `https://t.me/share/url?url=${encodeURIComponent(transactionData)}`;
window.open(telegramLink, '_blank');
}}
style={{
border: "none",
background: "none",
cursor: "pointer",
marginLeft: "20px",
}}
>
<img
src="telegram.svg"
alt="Share on Telegram"
style={{ height: "20px" }}
/>
</button>
<button
onClick={() => {
const etherscanLink = `https://etherscan.io/tx/${transaction.hash}`;
const timestamp = `${transaction.timestamp}`;
const transactionData = `UTC-Date-Time: ${timestamp}\n\nFrom: ${transaction.from}\nTo: ${transaction.to}\n\nMessage: ${transaction.inputData}\n\nEtherscan: ${etherscanLink}\n\nShared from: https://blockchat.auditutils.com`;
const twitterLink = `https://twitter.com/intent/tweet?text=${encodeURIComponent(transactionData)}`;
window.open(twitterLink, '_blank');
}}
style={{
border: "none",
background: "none",
cursor: "pointer",
marginLeft: "20px",
}}
>
<img
src="telegram.svg"
alt="Share on Telegram"
style={{ height: "20px" }}
/>
</button>
<button
onClick={() => {
const etherscanLink = `https://etherscan.io/tx/${transaction.hash}`;
const timestamp = `${transaction.timestamp}`;
const transactionData = `UTC-Date-Time: ${timestamp}\n\nFrom: ${transaction.from}\nTo: ${transaction.to}\n\nMessage: ${transaction.inputData}\n\nEtherscan: ${etherscanLink}\n\nShared from: https://blockchat.auditutils.com`;
const linkedInLink = `https://www.linkedin.com/sharing/share-offsite/?url=${encodeURIComponent(etherscanLink)}`;
window.open(linkedInLink, '_blank');
}}
style={{
border: "none",
background: "none",
cursor: "pointer",
marginLeft: "20px",
}}
>
<img
src="telegram.svg"
alt="Share on Telegram"
style={{ height: "20px" }}
/>
</button>