blob: 101c1d65c2814409abd54821a3474f2f9911f4d7 (
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 { Shelf, PosterLockup } from '@jet-app/app-store/api/models';
interface PosterLockupShelf extends Shelf {
items: PosterLockup[];
}
export function isPosterLockupShelf(
shelf: Shelf,
): shelf is PosterLockupShelf {
const { contentType, items } = shelf;
return contentType === 'posterLockup' && Array.isArray(items);
}
</script>
<script lang="ts">
import mediaQueries from '~/utils/media-queries';
import ShelfItemLayout from '~/components/ShelfItemLayout.svelte';
import PosterLockupItem from '~/components/jet/item/PosterLockupItem.svelte';
import ShelfWrapper from '~/components/Shelf/Wrapper.svelte';
export let shelf: PosterLockupShelf;
$: gridType = $mediaQueries === 'xsmall' ? 'Spotlight' : 'PosterLockup';
</script>
<ShelfWrapper {shelf}>
<ShelfItemLayout {shelf} {gridType} let:item>
<PosterLockupItem {item} />
</ShelfItemLayout>
</ShelfWrapper>
|