ArcadeFooterShelf.svelte
1 <script lang="ts" context="module"> 2 import type { Shelf, ArcadeFooter } from '@jet-app/app-store/api/models'; 3 4 interface ArcadeFooterShelf extends Shelf { 5 items: [ArcadeFooter]; 6 } 7 8 export function isArcadeFooterShelf( 9 shelf: Shelf, 10 ): shelf is ArcadeFooterShelf { 11 const { contentType, items } = shelf; 12 13 return contentType === 'arcadeFooter' && Array.isArray(items); 14 } 15 </script> 16 17 <script lang="ts"> 18 import ArcadeFooterItem from '~/components/jet/item/ArcadeFooterItem.svelte'; 19 import HorizontalShelf from '~/components/jet/shelf/HorizontalShelf.svelte'; 20 import ShelfWrapper from '~/components/Shelf/Wrapper.svelte'; 21 22 export let shelf: ArcadeFooterShelf; 23 24 $: gridRows = shelf.rowsPerColumn ?? undefined; 25 $: items = shelf.items; 26 </script> 27 28 <ShelfWrapper {shelf} withBottomPadding={false}> 29 <HorizontalShelf {gridRows} gridType="Spotlight" {items} let:item> 30 <ArcadeFooterItem {item} /> 31 </HorizontalShelf> 32 </ShelfWrapper>