Thread viewer for Bluesky
at 2.0 26 lines 833 B view raw
1<script lang="ts"> 2 import { Post, BlockedPost, MissingPost } from '../../models/posts.js'; 3 import { linkToPostThread } from '../../router.js'; 4 import BlockedPostView from './BlockedPostView.svelte'; 5 6 let { post }: { post: AnyPost } = $props(); 7</script> 8 9{#if post instanceof Post} 10 <p class="back"> 11 <i class="fa-solid fa-reply"></i> 12 <a href={linkToPostThread(post)}>See parent post (@{post.author.handle})</a> 13 </p> 14{:else if post instanceof BlockedPost} 15 <div class="back"> 16 <BlockedPostView {post} placement="parent" reason="Parent post blocked" /> 17 </div> 18{:else if post instanceof MissingPost} 19 <p class="back"> 20 <i class="fa-solid fa-ban"></i> parent post has been deleted 21 </p> 22{:else} 23 <p class="back"> 24 <i class="fa-solid fa-ban"></i> something went wrong, this shouldn't happen 25 </p> 26{/if}