Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
chibat committed Dec 10, 2023
1 parent 60bd943 commit c4a2cbb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 2 additions & 3 deletions components/Post.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -132,14 +132,13 @@ export default function Post(props: { post: GetPostsOutput; userId?: number }) {
)}
{BigInt(post.value.likes) > 0n &&
(
<a
href={void (0)}
<span
class="noDecoration ms-2"
onClick={() => openModal(post.value.id)}
style={{ cursor: "pointer" }}
>
{post.value.likes} Like{post.value.likes === 1 ? "" : "s"}
</a>
</span>
)}
</div>
{props.userId === post.value.user_id &&
Expand Down
5 changes: 2 additions & 3 deletions islands/PostView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -277,14 +277,13 @@ export default function PostView(
)}
{Number(likes) > 0 &&
(
<a
href={void (0)}
<span
class="noDecoration ms-2"
style={{ cursor: "pointer" }}
onClick={() => setModal(true)}
>
{likes} Like{likes === 1 ? "" : "s"}
</a>
</span>
)}
</div>
<div>
Expand Down

0 comments on commit c4a2cbb

Please sign in to comment.