blob: 4bd55e5a7795c83a3258db3346899bac5b2aee05 (
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
27
28
29
30
31
|
<script lang="ts" context="module">
import type { Brick, Shelf } from '@jet-app/app-store/api/models';
interface BrickShelf extends Shelf {
items: Brick[];
}
export function isBrickShelf(shelf: Shelf): shelf is BrickShelf {
const { contentType, items } = shelf;
return contentType === 'brick' && Array.isArray(items);
}
</script>
<script lang="ts">
import ShelfItemLayout from '~/components/ShelfItemLayout.svelte';
import BrickItem from '~/components/jet/item/BrickItem.svelte';
import ShelfWrapper from '~/components/Shelf/Wrapper.svelte';
export let shelf: BrickShelf;
</script>
<ShelfWrapper {shelf}>
<ShelfItemLayout
{shelf}
gridTypeForShelf="Brick"
gridTypeForGrid="F"
let:item
>
<BrickItem {item} />
</ShelfItemLayout>
</ShelfWrapper>
|