diff --git a/src/components/DisplayName.jsx b/src/components/DisplayName.jsx new file mode 100644 index 00000000..d5b1fbd6 --- /dev/null +++ b/src/components/DisplayName.jsx @@ -0,0 +1,9 @@ +import { useComment } from '@plebbit/plebbit-react-hooks'; + +const DisplayName = ({ commentCid }) => { + const comment = useComment({ commentCid }); + + return {comment?.author?.displayName ?? 'Anonymous'}; +}; + +export default DisplayName; diff --git a/src/components/views/AllCatalog.jsx b/src/components/views/AllCatalog.jsx index dd9735d2..cb31ce04 100755 --- a/src/components/views/AllCatalog.jsx +++ b/src/components/views/AllCatalog.jsx @@ -12,6 +12,7 @@ import { Threads, PostPreview, PostMenuCatalog } from '../styled/views/Catalog.s import { TopBar, Footer } from '../styled/views/Thread.styled'; import { AlertModal } from '../styled/modals/AlertModal.styled'; import CatalogLoader from '../CatalogLoader'; +import DisplayName from '../DisplayName'; import EditModal from '../modals/EditModal'; import ImageBanner from '../ImageBanner'; import VerifiedAuthor from '../VerifiedAuthor'; @@ -383,7 +384,10 @@ const CatalogPost = ({ post }) => { {thread.replyCount > 0 ? (
Last reply by - Anonymous + + {' '} + {' '} + {getFormattedTime(thread.lastReplyTimestamp)}
) : null} diff --git a/src/components/views/Catalog.jsx b/src/components/views/Catalog.jsx index 706e0e86..0e86b95a 100755 --- a/src/components/views/Catalog.jsx +++ b/src/components/views/Catalog.jsx @@ -18,6 +18,7 @@ import SettingsModal from '../modals/SettingsModal'; import BoardSettings from '../BoardSettings'; import BoardStats from '../BoardStats'; import CatalogLoader from '../CatalogLoader'; +import DisplayName from '../DisplayName'; import ImageBanner from '../ImageBanner'; import OfflineIndicator from '../OfflineIndicator'; import VerifiedAuthor from '../VerifiedAuthor'; @@ -769,7 +770,10 @@ const CatalogPost = ({ post }) => { {thread.replyCount > 0 ? (
Last reply by - Anonymous + + {' '} + {' '} + {getFormattedTime(thread.lastReplyTimestamp)}
) : null} diff --git a/src/components/views/SubscriptionsCatalog.jsx b/src/components/views/SubscriptionsCatalog.jsx index 73c85486..458a5bfe 100755 --- a/src/components/views/SubscriptionsCatalog.jsx +++ b/src/components/views/SubscriptionsCatalog.jsx @@ -12,6 +12,7 @@ import { Threads, PostPreview, PostMenuCatalog } from '../styled/views/Catalog.s import { TopBar, Footer } from '../styled/views/Thread.styled'; import { AlertModal } from '../styled/modals/AlertModal.styled'; import CatalogLoader from '../CatalogLoader'; +import DisplayName from '../DisplayName'; import EditModal from '../modals/EditModal'; import ImageBanner from '../ImageBanner'; import VerifiedAuthor from '../VerifiedAuthor'; @@ -383,7 +384,10 @@ const CatalogPost = ({ post }) => { {thread.replyCount > 0 ? (
Last reply by - Anonymous + + {' '} + {' '} + {getFormattedTime(thread.lastReplyTimestamp)}
) : null}