blob: 6b2978095290b3c431d89fd4f5471b159abfc41f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
<script lang="ts" context="module">
import type { Shelf, SearchLink } from '@jet-app/app-store/api/models';
interface SearchLinkShelf extends Shelf {
items: SearchLink[];
}
export function isSearchLinkShelf(shelf: Shelf): shelf is SearchLinkShelf {
const { contentType, items } = shelf;
return contentType === 'searchLink' && Array.isArray(items);
}
</script>
<script lang="ts">
import ShelfItemLayout from '~/components/ShelfItemLayout.svelte';
import SearchLinkItem from '~/components/jet/item/SearchLinkItem.svelte';
import ShelfWrapper from '~/components/Shelf/Wrapper.svelte';
export let shelf: SearchLinkShelf;
</script>
<ShelfWrapper {shelf}>
<ShelfItemLayout {shelf} gridType="SearchLink" let:item>
<SearchLinkItem {item} />
</ShelfItemLayout>
</ShelfWrapper>
|