fix(Post Form): use defaultValue for Name when displayName is defined

This commit is contained in:
plebeius.eth
2023-09-22 21:43:10 +02:00
parent a7a845eada
commit c779c34243
4 changed files with 276 additions and 298 deletions
+2 -2
View File
@@ -839,8 +839,8 @@ const Thread = () => {
<tr data-type='Name'>
<td id='td-name'>Name</td>
<td>
{account && account?.author && account?.author.displayName ? (
<input name='name' type='text' tabIndex={1} value={account?.author?.displayName} ref={nameRef} disabled />
{account?.author.displayName ? (
<input name='name' type='text' tabIndex={1} defaultValue={account?.author?.displayName} ref={nameRef} />
) : (
<input name='name' type='text' placeholder='Anonymous' tabIndex={1} ref={nameRef} />
)}