•
•
{Math.floor( (data.post.post_view.counts.upvotes / (data.post.post_view.counts.upvotes + data.post.post_view.counts.downvotes || 1)) * 100 )}%
{post.name}
{#if post.url}
{post.url}
{/if} {#if isImage(post.url)}
{:else if post.embed_video_url}
{/if} {#if post.body}
{/if}
Comments
{postData.counts.comments}
{#await data.streamed.comments}
{:then comments} {#if $user}
(comments.comments = [ comment.detail.comment_view, ...comments.comments, ])} /> {/if}
{#if moreComments}
{ if (!moreComments) return loading = true const loadedComments = await getClient().getComments({ auth: $authData?.token, max_depth: 3, page: ++commentsPage, limit: 25, post_id: data.post.post_view.post.id, }) if (comments.comments == loadedComments.comments) { comments.comments = [ ...comments.comments, ...loadedComments.comments.filter( (comment) => !comments.comments.includes(comment) ), ] } else { moreComments = false } loading = false }} > Load more
{/if} {:catch}
Failed to load comments.
{/await}