X-Git-Url: http://these/git/?a=blobdiff_plain;f=ui%2Fsrc%2Fcomponents%2Fpost-listing.tsx;fp=ui%2Fsrc%2Fcomponents%2Fpost-listing.tsx;h=b4cc4f928298e82549fc8f395c66fdea751aa6d3;hb=dc94e58cbf7e7de10d97331a3056380a3416e0b0;hp=7d10acf72139bd41586fa5e3299fa3b548498175;hpb=790b944031f9433be765936763d848ffa6e1b496;p=lemmy.git diff --git a/ui/src/components/post-listing.tsx b/ui/src/components/post-listing.tsx index 7d10acf7..b4cc4f92 100644 --- a/ui/src/components/post-listing.tsx +++ b/ui/src/components/post-listing.tsx @@ -20,6 +20,7 @@ import { MomentTime } from './moment-time'; import { PostForm } from './post-form'; import { IFramelyCard } from './iframely-card'; import { UserListing } from './user-listing'; +import { CommunityLink } from './community-link'; import { md, mdToHtml, @@ -30,6 +31,7 @@ import { getUnixTime, pictrsImage, setupTippy, + hostname, previewLines, } from '../utils'; import { i18n } from '../i18next'; @@ -314,22 +316,21 @@ export class PostListing extends Component { )} - {post.url && - !(new URL(post.url).hostname == window.location.hostname) && ( - - - {new URL(post.url).hostname} - - - - - - )} + {post.url && !(hostname(post.url) == window.location.hostname) && ( + + + {hostname(post.url)} + + + + + + )} {(isImage(post.url) || this.props.post.thumbnail_url) && ( <> {!this.state.imageExpanded ? ( @@ -422,6 +423,9 @@ export class PostListing extends Component { user={{ name: post.creator_name, avatar: post.creator_avatar, + id: post.creator_id, + local: post.creator_local, + actor_id: post.creator_actor_id, }} /> {this.isMod && ( @@ -442,9 +446,14 @@ export class PostListing extends Component { {this.props.showCommunity && ( {i18n.t('to')} - - {post.community_name} - + )}