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" />
+2 -2
View File
@@ -1,8 +1,8 @@
<div
class="sticky top-20 border bg-white shadow-md border-slate-100
dark:border-zinc-800 dark:bg-zinc-900 break-words hidden lg:flex
flex-col gap-4 p-8 max-w-sm rounded-md h-max max-h-[calc(100vh-6rem)]
overflow-auto w-full"
flex-col gap-4 p-8 max-w-[20rem] min-w-[20rem] rounded-md h-max max-h-[calc(100vh-6rem)]
overflow-auto"
>
<slot />
</div>