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, 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 by
<span className='post-author'>{thread.author.displayName ? ` ${thread.author.displayName} ` : ' Anonymous '}</span> <span className='post-author'>{thread.author.displayName ? ` ${thread.author.displayName} ` : ' Anonymous '}</span>
<span className='post-ago'>{thread.timestamp ? getFormattedTime(thread.timestamp) : null}</span> <span className='post-ago'>{thread.timestamp ? getFormattedTime(thread.timestamp) : null}</span>
@@ -688,8 +688,8 @@ const CatalogPost = ({ post }) => {
}} }}
onMouseLeave={() => setIsHoveringForMenu(false)} onMouseLeave={() => setIsHoveringForMenu(false)}
> >
<b key={`b2-`}>{thread.title ? `${thread.title}` : null}</b> <b key={`b2-`}>{thread.title ? `${thread.title}${thread.content ? ': ' : ''}` : null}</b>
{thread.content ? `: ${thread.content}` : null} {thread.content ? `${thread.content}` : null}
</span> </span>
</div> </div>
</Link> </Link>
+3 -3
View File
@@ -763,7 +763,7 @@ const CatalogPost = ({ post }) => {
top: popupPosition.top + 5, 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 by
<span className='post-author'>{thread.author.displayName ? ` ${thread.author.displayName} ` : ' Anonymous '}</span> <span className='post-author'>{thread.author.displayName ? ` ${thread.author.displayName} ` : ' Anonymous '}</span>
<span className='post-ago'>{thread.timestamp ? getFormattedTime(thread.timestamp) : null}</span> <span className='post-ago'>{thread.timestamp ? getFormattedTime(thread.timestamp) : null}</span>
@@ -1108,8 +1108,8 @@ const CatalogPost = ({ post }) => {
}} }}
onMouseLeave={() => setIsHoveringForMenu(false)} onMouseLeave={() => setIsHoveringForMenu(false)}
> >
<b key={`b2-`}>{thread.title ? `${thread.title}` : null}</b> <b key={`b2-`}>{thread.title ? `${thread.title}${thread.content ? ': ' : ''}` : null}</b>
{thread.content ? `: ${thread.content}` : null} {thread.content ? `${thread.content}` : null}
</span> </span>
</div> </div>
</div> </div>
@@ -377,7 +377,7 @@ const CatalogPost = ({ post }) => {
top: popupPosition.top + 5, 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 by
<span className='post-author'>{thread.author.displayName ? ` ${thread.author.displayName} ` : ' Anonymous '}</span> <span className='post-author'>{thread.author.displayName ? ` ${thread.author.displayName} ` : ' Anonymous '}</span>
<span className='post-ago'>{thread.timestamp ? getFormattedTime(thread.timestamp) : null}</span> <span className='post-ago'>{thread.timestamp ? getFormattedTime(thread.timestamp) : null}</span>
@@ -688,8 +688,8 @@ const CatalogPost = ({ post }) => {
}} }}
onMouseLeave={() => setIsHoveringForMenu(false)} onMouseLeave={() => setIsHoveringForMenu(false)}
> >
<b key={`b2-`}>{thread.title ? `${thread.title}` : null}</b> <b key={`b2-`}>{thread.title ? `${thread.title}${thread.content ? ': ' : ''}` : null}</b>
{thread.content ? `: ${thread.content}` : null} {thread.content ? `${thread.content}` : null}
</span> </span>
</div> </div>
</Link> </Link>