fix(catalog): fixed bugged appearance for posts without titles or content

This commit is contained in:
plebeius.eth
2023-10-07 11:25:19 +02:00
parent a15ad68adb
commit ac7ea57244
3 changed files with 9 additions and 9 deletions
+3 -3
View File
@@ -377,7 +377,7 @@ const CatalogPost = ({ post }) => {
top: popupPosition.top + 5,
}}
>
<span className='post-subject'>{thread.title ? `${thread.title} ` : 'Posted '}</span>
{thread.title ? <span className='post-subject'>{thread.title} </span> : 'Posted '}
by
<span className='post-author'>{thread.author.displayName ? ` ${thread.author.displayName} ` : ' Anonymous '}</span>
<span className='post-ago'>{thread.timestamp ? getFormattedTime(thread.timestamp) : null}</span>
@@ -688,8 +688,8 @@ const CatalogPost = ({ post }) => {
}}
onMouseLeave={() => setIsHoveringForMenu(false)}
>
<b key={`b2-`}>{thread.title ? `${thread.title}` : null}</b>
{thread.content ? `: ${thread.content}` : null}
<b key={`b2-`}>{thread.title ? `${thread.title}${thread.content ? ': ' : ''}` : null}</b>
{thread.content ? `${thread.content}` : null}
</span>
</div>
</Link>
+3 -3
View File
@@ -763,7 +763,7 @@ const CatalogPost = ({ post }) => {
top: popupPosition.top + 5,
}}
>
<span className='post-subject'>{thread.title ? `${thread.title} ` : 'Posted '}</span>
{thread.title ? <span className='post-subject'>{thread.title} </span> : 'Posted '}
by
<span className='post-author'>{thread.author.displayName ? ` ${thread.author.displayName} ` : ' Anonymous '}</span>
<span className='post-ago'>{thread.timestamp ? getFormattedTime(thread.timestamp) : null}</span>
@@ -1108,8 +1108,8 @@ const CatalogPost = ({ post }) => {
}}
onMouseLeave={() => setIsHoveringForMenu(false)}
>
<b key={`b2-`}>{thread.title ? `${thread.title}` : null}</b>
{thread.content ? `: ${thread.content}` : null}
<b key={`b2-`}>{thread.title ? `${thread.title}${thread.content ? ': ' : ''}` : null}</b>
{thread.content ? `${thread.content}` : null}
</span>
</div>
</div>
@@ -377,7 +377,7 @@ const CatalogPost = ({ post }) => {
top: popupPosition.top + 5,
}}
>
<span className='post-subject'>{thread.title ? `${thread.title} ` : 'Posted '}</span>
{thread.title ? <span className='post-subject'>{thread.title} </span> : 'Posted '}
by
<span className='post-author'>{thread.author.displayName ? ` ${thread.author.displayName} ` : ' Anonymous '}</span>
<span className='post-ago'>{thread.timestamp ? getFormattedTime(thread.timestamp) : null}</span>
@@ -688,8 +688,8 @@ const CatalogPost = ({ post }) => {
}}
onMouseLeave={() => setIsHoveringForMenu(false)}
>
<b key={`b2-`}>{thread.title ? `${thread.title}` : null}</b>
{thread.content ? `: ${thread.content}` : null}
<b key={`b2-`}>{thread.title ? `${thread.title}${thread.content ? ': ' : ''}` : null}</b>
{thread.content ? `${thread.content}` : null}
</span>
</div>
</Link>