mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-15 10:02:47 +03:00
parent
f769c89c3c
commit
65b3812191
@ -60,6 +60,15 @@ const renderWithSigil = (props, timestamp) => {
|
||||
name = cite(props.msg.author);
|
||||
}
|
||||
|
||||
let nameSpan = null;
|
||||
|
||||
const copyNotice = (saveName) => {
|
||||
nameSpan.innerText = 'Copied';
|
||||
setTimeout(() => {
|
||||
nameSpan.innerText = saveName;
|
||||
}, 800);
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="flex w-100">
|
||||
<OverlaySigil
|
||||
@ -80,8 +89,11 @@ const renderWithSigil = (props, timestamp) => {
|
||||
'mw5 db truncate pointer ' +
|
||||
(contact.nickname ? '' : 'mono')
|
||||
}
|
||||
ref={(e) => nameSpan = e}
|
||||
onClick={() => {
|
||||
const saveName = name;
|
||||
writeText(props.msg.author);
|
||||
copyNotice(saveName);
|
||||
}}
|
||||
title={`~${props.msg.author}`}
|
||||
>
|
||||
|
Loading…
Reference in New Issue
Block a user