fix: Remove unnecessary string interpolations
authorJay Sitter <jay@jaysitter.com>
Sun, 25 Jun 2023 23:36:19 +0000 (19:36 -0400)
committerJay Sitter <jay@jaysitter.com>
Mon, 26 Jun 2023 22:30:31 +0000 (18:30 -0400)
src/shared/components/comment/comment-node.tsx
src/shared/components/common/vote-buttons.tsx
src/shared/components/home/emojis-form.tsx
src/shared/components/home/tagline-form.tsx
src/shared/components/person/cake-day.tsx
src/shared/components/person/profile.tsx
src/shared/components/post/post-listing.tsx

index 394de6ec53f783b86f521dc3ab36ea033674d8b7..4ad1538357810a99a0955f86f7f85ea528b37d02 100644 (file)
@@ -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">
index 09799188db515bf4945b101bfd0ce517be6dfb94..005db8c003ec5aecbe806d9ff5996a3f07841f8b 100644 (file)
@@ -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)}
index 930bd55c5bcfd7ff3b26743ed8ba523faba06746..da0028d9389a2924a432de1ddb0336dcbe0a21d4 100644 (file)
@@ -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>
index c79d9554b0c415292534ff2893c758e8c6101e7f..bdbe1e63df87649f6e739d9ca8c71afca3d5d0ef 100644 (file)
@@ -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>
index ddb12beaa86f458516f7914bc40edc9ebab3d7db..3eeaf75ee01f195e146cf2ad69608787bc738afa 100644 (file)
@@ -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" />
index 70bada821c950adf659b496dd9af95407c85ad12..714b6bedcc2e5bd501afe93da99a424496b8afd1 100644 (file)
@@ -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}
index f23ff900ae108b8c1f5ec2664251a174d44f1df0..61561e98abe5012a34a3d4f0247b2bb22c161b53 100644 (file)
@@ -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}