feat: Add upvote %

This commit is contained in:
Xyphyn committed 2023-07-06 13:28:38 -07:00
1 parent 71ca33d9fc
commit 54b1cef68f
3 files changed
+120 -98

No files matched your search

+8
View File
@@ -61,6 +61,14 @@
<UserLink user={postRes.creator} />
<span>•</span>
<RelativeDate date={new Date(postRes.post.published)} />
<span>•</span>
<span>
{Math.floor(
(postRes.counts.upvotes /
(postRes.counts.upvotes + postRes.counts.downvotes || 1)) *
100
)}%
</span>
</span>
</div>
<div class="ml-auto" />