From 8fd08e58e3c5e61fafa56e48d0274333230cc29e Mon Sep 17 00:00:00 2001 From: Jay Sitter <jay@jaysitter.com> Date: Sun, 25 Jun 2023 19:36:19 -0400 Subject: [PATCH] fix: Remove unnecessary string interpolations --- src/shared/components/comment/comment-node.tsx | 2 +- src/shared/components/common/vote-buttons.tsx | 4 ++-- src/shared/components/home/emojis-form.tsx | 2 +- src/shared/components/home/tagline-form.tsx | 4 ++-- src/shared/components/person/cake-day.tsx | 2 +- src/shared/components/person/profile.tsx | 4 ++-- src/shared/components/post/post-listing.tsx | 4 ++-- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/shared/components/comment/comment-node.tsx b/src/shared/components/comment/comment-node.tsx index 394de6e..4ad1538 100644 --- a/src/shared/components/comment/comment-node.tsx +++ b/src/shared/components/comment/comment-node.tsx @@ -312,7 +312,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> { <PersonListing person={cv.creator} /> </span> {cv.comment.distinguished && ( - <Icon icon="shield" inline classes={`text-danger me-2`} /> + <Icon icon="shield" inline classes="text-danger me-2" /> )} {this.isPostCreator && ( <div className="badge text-bg-light d-none d-sm-inline me-2"> diff --git a/src/shared/components/common/vote-buttons.tsx b/src/shared/components/common/vote-buttons.tsx index 0979918..005db8c 100644 --- a/src/shared/components/common/vote-buttons.tsx +++ b/src/shared/components/common/vote-buttons.tsx @@ -174,7 +174,7 @@ export class VoteButtons extends Component<VoteButtonsProps, VoteButtonsState> { render() { return ( - <div className={`vote-bar col-1 pe-0 small text-center`}> + <div className="vote-bar col-1 pe-0 small text-center"> <button type="button" className={`btn-animate btn btn-link p-0 ${ @@ -193,7 +193,7 @@ export class VoteButtons extends Component<VoteButtonsProps, VoteButtonsState> { </button> {showScores() ? ( <div - className={`unselectable pointer text-muted px-1 post-score`} + className="unselectable pointer text-muted px-1 post-score" data-tippy-content={tippy(this.props.counts)} > {numToSI(this.props.counts.score)} diff --git a/src/shared/components/home/emojis-form.tsx b/src/shared/components/home/emojis-form.tsx index 930bd55..da0028d 100644 --- a/src/shared/components/home/emojis-form.tsx +++ b/src/shared/components/home/emojis-form.tsx @@ -258,7 +258,7 @@ export class EmojiForm extends Component<EmojiFormProps, EmojiFormState> { > <Icon icon="trash" - classes={`icon-inline text-danger`} + classes="icon-inline text-danger" /> </button> </div> diff --git a/src/shared/components/home/tagline-form.tsx b/src/shared/components/home/tagline-form.tsx index c79d955..bdbe1e6 100644 --- a/src/shared/components/home/tagline-form.tsx +++ b/src/shared/components/home/tagline-form.tsx @@ -71,7 +71,7 @@ export class TaglineForm extends Component<TaglineFormProps, TaglineFormState> { data-tippy-content={I18NextService.i18n.t("edit")} aria-label={I18NextService.i18n.t("edit")} > - <Icon icon="edit" classes={`icon-inline`} /> + <Icon icon="edit" classes="icon-inline" /> </button> <button @@ -83,7 +83,7 @@ export class TaglineForm extends Component<TaglineFormProps, TaglineFormState> { data-tippy-content={I18NextService.i18n.t("delete")} aria-label={I18NextService.i18n.t("delete")} > - <Icon icon="trash" classes={`icon-inline text-danger`} /> + <Icon icon="trash" classes="icon-inline text-danger" /> </button> </td> </tr> diff --git a/src/shared/components/person/cake-day.tsx b/src/shared/components/person/cake-day.tsx index ddb12be..3eeaf75 100644 --- a/src/shared/components/person/cake-day.tsx +++ b/src/shared/components/person/cake-day.tsx @@ -10,7 +10,7 @@ export class CakeDay extends Component<CakeDayProps, any> { render() { return ( <div - className={`cake-day mx-2 d-inline-block unselectable pointer`} + className="cake-day mx-2 d-inline-block unselectable pointer" data-tippy-content={this.cakeDayTippy()} > <Icon icon="cake" classes="icon-inline" /> diff --git a/src/shared/components/person/profile.tsx b/src/shared/components/person/profile.tsx index 70bada8..714b6be 100644 --- a/src/shared/components/person/profile.tsx +++ b/src/shared/components/person/profile.tsx @@ -647,12 +647,12 @@ export class Profile extends Component< value={this.state.banReason} onInput={linkEvent(this, this.handleModBanReasonChange)} /> - <label className="col-form-label" htmlFor={`mod-ban-expires`}> + <label className="col-form-label" htmlFor="mod-ban-expires"> {I18NextService.i18n.t("expires")} </label> <input type="number" - id={`mod-ban-expires`} + id="mod-ban-expires" className="form-control me-2" placeholder={I18NextService.i18n.t("number_of_days")} value={this.state.banExpireDays} diff --git a/src/shared/components/post/post-listing.tsx b/src/shared/components/post/post-listing.tsx index f23ff90..61561e9 100644 --- a/src/shared/components/post/post-listing.tsx +++ b/src/shared/components/post/post-listing.tsx @@ -1264,12 +1264,12 @@ export class PostListing extends Component<PostListingProps, PostListingState> { value={this.state.banReason} onInput={linkEvent(this, this.handleModBanReasonChange)} /> - <label className="col-form-label" htmlFor={`mod-ban-expires`}> + <label className="col-form-label" htmlFor="mod-ban-expires"> {I18NextService.i18n.t("expires")} </label> <input type="number" - id={`mod-ban-expires`} + id="mod-ban-expires" className="form-control me-2" placeholder={I18NextService.i18n.t("number_of_days")} value={this.state.banExpireDays} -- 2.44.1