From ac7ea57244da960f20c68fe1b7156c8682481d1a Mon Sep 17 00:00:00 2001 From: "plebeius.eth" Date: Sat, 7 Oct 2023 11:25:19 +0200 Subject: [PATCH] fix(catalog): fixed bugged appearance for posts without titles or content --- src/components/views/AllCatalog.jsx | 6 +++--- src/components/views/Catalog.jsx | 6 +++--- src/components/views/SubscriptionsCatalog.jsx | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/components/views/AllCatalog.jsx b/src/components/views/AllCatalog.jsx index cb31ce04..b9e072b4 100755 --- a/src/components/views/AllCatalog.jsx +++ b/src/components/views/AllCatalog.jsx @@ -377,7 +377,7 @@ const CatalogPost = ({ post }) => { top: popupPosition.top + 5, }} > - {thread.title ? `${thread.title} ` : 'Posted '} + {thread.title ? {thread.title} : 'Posted '} by {thread.author.displayName ? ` ${thread.author.displayName} ` : ' Anonymous '} {thread.timestamp ? getFormattedTime(thread.timestamp) : null} @@ -688,8 +688,8 @@ const CatalogPost = ({ post }) => { }} onMouseLeave={() => setIsHoveringForMenu(false)} > - {thread.title ? `${thread.title}` : null} - {thread.content ? `: ${thread.content}` : null} + {thread.title ? `${thread.title}${thread.content ? ': ' : ''}` : null} + {thread.content ? `${thread.content}` : null} diff --git a/src/components/views/Catalog.jsx b/src/components/views/Catalog.jsx index 0e86b95a..6d3e24a9 100755 --- a/src/components/views/Catalog.jsx +++ b/src/components/views/Catalog.jsx @@ -763,7 +763,7 @@ const CatalogPost = ({ post }) => { top: popupPosition.top + 5, }} > - {thread.title ? `${thread.title} ` : 'Posted '} + {thread.title ? {thread.title} : 'Posted '} by {thread.author.displayName ? ` ${thread.author.displayName} ` : ' Anonymous '} {thread.timestamp ? getFormattedTime(thread.timestamp) : null} @@ -1108,8 +1108,8 @@ const CatalogPost = ({ post }) => { }} onMouseLeave={() => setIsHoveringForMenu(false)} > - {thread.title ? `${thread.title}` : null} - {thread.content ? `: ${thread.content}` : null} + {thread.title ? `${thread.title}${thread.content ? ': ' : ''}` : null} + {thread.content ? `${thread.content}` : null} diff --git a/src/components/views/SubscriptionsCatalog.jsx b/src/components/views/SubscriptionsCatalog.jsx index 458a5bfe..71b29bad 100755 --- a/src/components/views/SubscriptionsCatalog.jsx +++ b/src/components/views/SubscriptionsCatalog.jsx @@ -377,7 +377,7 @@ const CatalogPost = ({ post }) => { top: popupPosition.top + 5, }} > - {thread.title ? `${thread.title} ` : 'Posted '} + {thread.title ? {thread.title} : 'Posted '} by {thread.author.displayName ? ` ${thread.author.displayName} ` : ' Anonymous '} {thread.timestamp ? getFormattedTime(thread.timestamp) : null} @@ -688,8 +688,8 @@ const CatalogPost = ({ post }) => { }} onMouseLeave={() => setIsHoveringForMenu(false)} > - {thread.title ? `${thread.title}` : null} - {thread.content ? `: ${thread.content}` : null} + {thread.title ? `${thread.title}${thread.content ? ': ' : ''}` : null} + {thread.content ? `${thread.content}` : null}