mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
fix undefined on mobile
This commit is contained in:
@@ -225,7 +225,7 @@ const ReplyModal = ({ isOpen, closeModal }) => {
|
|||||||
</div>
|
</div>
|
||||||
<div id="form">
|
<div id="form">
|
||||||
<div>
|
<div>
|
||||||
{account.author?.displayName ? (
|
{account && account.author && account.author.displayName ? (
|
||||||
<input id="name" type="text" value={account.author?.displayName} ref={nameRef} disabled />
|
<input id="name" type="text" value={account.author?.displayName} ref={nameRef} disabled />
|
||||||
) : (
|
) : (
|
||||||
<input id="name" type="text" placeholder="Anonymous" ref={nameRef} />
|
<input id="name" type="text" placeholder="Anonymous" ref={nameRef} />
|
||||||
|
|||||||
@@ -639,8 +639,8 @@ const Board = () => {
|
|||||||
<tr data-type="Name">
|
<tr data-type="Name">
|
||||||
<td id="td-name">Name</td>
|
<td id="td-name">Name</td>
|
||||||
<td>
|
<td>
|
||||||
{account.author.displayName ? (
|
{account && account.author && account.author.displayName ? (
|
||||||
<input name="name" type="text" tabIndex={1} value={account.author.displayName} ref={nameRef} disabled />
|
<input name="name" type="text" tabIndex={1} value={account.author?.displayName} ref={nameRef} disabled />
|
||||||
) : (
|
) : (
|
||||||
<input name="name" type="text" placeholder="Anonymous" tabIndex={1} ref={nameRef} />
|
<input name="name" type="text" placeholder="Anonymous" tabIndex={1} ref={nameRef} />
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -565,8 +565,8 @@ const Catalog = () => {
|
|||||||
<tr data-type="Name">
|
<tr data-type="Name">
|
||||||
<td id="td-name">Name</td>
|
<td id="td-name">Name</td>
|
||||||
<td>
|
<td>
|
||||||
{account.author.displayName ? (
|
{account && account.author && account.author.displayName ? (
|
||||||
<input name="name" type="text" tabIndex={1} value={account.author.displayName} ref={nameRef} disabled />
|
<input name="name" type="text" tabIndex={1} value={account.author?.displayName} ref={nameRef} disabled />
|
||||||
) : (
|
) : (
|
||||||
<input name="name" type="text" placeholder="Anonymous" tabIndex={1} ref={nameRef} />
|
<input name="name" type="text" placeholder="Anonymous" tabIndex={1} ref={nameRef} />
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -285,7 +285,7 @@ const Pending = () => {
|
|||||||
|
|
||||||
|
|
||||||
<span className="poster-address">
|
<span className="poster-address">
|
||||||
(u/{account.author.shortAddress})
|
(u/{account.author?.shortAddress})
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<span className="date-time" data-utc="data">{getDate(comment?.timestamp)}</span>
|
<span className="date-time" data-utc="data">{getDate(comment?.timestamp)}</span>
|
||||||
@@ -326,7 +326,7 @@ const Pending = () => {
|
|||||||
Anonymous</span>}
|
Anonymous</span>}
|
||||||
|
|
||||||
<span key={`mob-pa-${"pending"}`} className="poster-address-mobile">
|
<span key={`mob-pa-${"pending"}`} className="poster-address-mobile">
|
||||||
(u/{account.author.shortAddress})
|
(u/{account.author?.shortAddress})
|
||||||
</span>
|
</span>
|
||||||
<br key={`mob-br1-${"pending"}`} />
|
<br key={`mob-br1-${"pending"}`} />
|
||||||
{comment.title ? (
|
{comment.title ? (
|
||||||
|
|||||||
@@ -614,8 +614,8 @@ const Thread = () => {
|
|||||||
<tr data-type="Name">
|
<tr data-type="Name">
|
||||||
<td id="td-name">Name</td>
|
<td id="td-name">Name</td>
|
||||||
<td>
|
<td>
|
||||||
{account.author.displayName ? (
|
{account && account.author && account.author.displayName ? (
|
||||||
<input name="name" type="text" tabIndex={1} value={account.author.displayName} ref={nameRef} disabled />
|
<input name="name" type="text" tabIndex={1} value={account.author?.displayName} ref={nameRef} disabled />
|
||||||
) : (
|
) : (
|
||||||
<input name="name" type="text" placeholder="Anonymous" tabIndex={1} ref={nameRef} />
|
<input name="name" type="text" placeholder="Anonymous" tabIndex={1} ref={nameRef} />
|
||||||
)}
|
)}
|
||||||
|
|||||||
Reference in New Issue
Block a user