From b5ef4db621987db636d79d12174011f7c9326ec0 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Fri, 4 Aug 2023 16:48:35 -0400 Subject: [PATCH] Fixing PR comments. --- src/shared/components/post/post-listing.tsx | 25 +++++++++------------ 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/src/shared/components/post/post-listing.tsx b/src/shared/components/post/post-listing.tsx index 1a4336ae..1e3c9457 100644 --- a/src/shared/components/post/post-listing.tsx +++ b/src/shared/components/post/post-listing.tsx @@ -428,7 +428,7 @@ export class PostListing extends Component { { this.props.allLanguages.find( - lang => lang.id === post_view.post.language_id + lang => lang.id === post_view.post.language_id, )?.name } @@ -524,7 +524,7 @@ export class PostListing extends Component { @@ -745,14 +745,11 @@ export class PostListing extends Component { } public get linkTarget(): string { - if ( - UserService.Instance.myUserInfo?.local_user_view.local_user - .open_links_in_new_tab - ) { - return "_blank"; - } - // _self is the default target on links when the field is not specified - return "_self"; + return UserService.Instance.myUserInfo?.local_user_view.local_user + .open_links_in_new_tab + ? "_blank" + : // _self is the default target on links when the field is not specified + "_self"; } get commentsButton() { @@ -1136,7 +1133,7 @@ export class PostListing extends Component { className="btn btn-link btn-sm d-flex align-items-center rounded-0 dropdown-item" onClick={linkEvent( this, - !removed ? this.handleModRemoveShow : this.handleModRemoveSubmit + !removed ? this.handleModRemoveShow : this.handleModRemoveSubmit, )} > {/* TODO: Find an icon for this. */} @@ -1209,7 +1206,7 @@ export class PostListing extends Component { className="btn btn-link btn-animate text-muted py-0 d-inline-block" onClick={linkEvent( this, - this.handleCancelShowConfirmTransferCommunity + this.handleCancelShowConfirmTransferCommunity, )} aria-label={I18NextService.i18n.t("no")} > @@ -1793,7 +1790,7 @@ export class PostListing extends Component { this.props.moderators, this.props.admins, undefined, - true + true, ); } @@ -1801,7 +1798,7 @@ export class PostListing extends Component { return canMod( this.postView.creator.id, this.props.moderators, - this.props.admins + this.props.admins, ); }