Skip to content

Commit

Permalink
refactor: remove counter
Browse files Browse the repository at this point in the history
  • Loading branch information
NiclasNorin committed Feb 29, 2024
1 parent 18702cc commit 5f8ea34
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 81 deletions.
4 changes: 0 additions & 4 deletions source/js/front/like.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
import { getLikedPostsFromLocalStorage } from "./helpers/likeHelpers";
import LikedPostCounter from "./likedPostCounter";

class Like {
likeIconSelector: string;
likedPostCounter: LikedPostCounter;

constructor() {
this.likeIconSelector = '.like-icon';
this.likedPostCounter = new LikedPostCounter();
this.handleLike();
this.observe();
}
Expand Down Expand Up @@ -42,7 +39,6 @@ class Like {

localStorage.setItem('liked-posts', JSON.stringify(likedPostIds));
this.toggleLiked(postId);
this.likedPostCounter.dispatchLikedPostLength();
}

private toggleLiked(postId: string) {
Expand Down
63 changes: 0 additions & 63 deletions source/js/front/likedPostCounter.ts

This file was deleted.

14 changes: 0 additions & 14 deletions source/sass/like-posts.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,4 @@ $base: var(--base, 8px) !default;
&:hover {
transform: scale(1.1);
}
}

.liked-post-counter {
background: #f78da7;
position: absolute;
left: 14px;
top: 18px;
width: 20px;
height: 20px;
border-radius: 50px;
color: #76232f;
display: flex;
justify-content: center;
align-items: center;
}

0 comments on commit 5f8ea34

Please sign in to comment.