forked from off-topic/apps.apple.com
init commit
This commit is contained in:
17
src/components/jet/item/Annotation/AnnotationItem.svelte
Normal file
17
src/components/jet/item/Annotation/AnnotationItem.svelte
Normal file
@@ -0,0 +1,17 @@
|
||||
<script lang="ts">
|
||||
import { type Annotation } from '@jet-app/app-store/api/models';
|
||||
import ModernAnnotationItemRenderer from '~/components/jet/item/Annotation/ModernAnnotationItemRenderer.svelte';
|
||||
import LegacyAnnotationRenderer from '~/components/jet/item/Annotation/LegacyAnnotationRenderer.svelte';
|
||||
|
||||
export let item: Annotation;
|
||||
|
||||
$: ({ items, items_V3, linkAction, summary } = item);
|
||||
|
||||
$: shouldRenderModernAnnotation = items_V3.length > 0;
|
||||
</script>
|
||||
|
||||
{#if shouldRenderModernAnnotation}
|
||||
<ModernAnnotationItemRenderer items={items_V3} {summary} />
|
||||
{:else}
|
||||
<LegacyAnnotationRenderer {items} {linkAction} />
|
||||
{/if}
|
||||
Reference in New Issue
Block a user