/ src / components / pages / TodayPage.svelte
TodayPage.svelte
 1  <!--
 2  @component
 3  Page component for the "Today Page"
 4  
 5  This is required so that the correct layout of the cards within each `TodayCardShelf` 
 6  can be computed at the page level, as the algorithm for stretching the correct cards
 7  in each shelf requires knowledge of the previously-rendered shelf
 8  -->
 9  <script lang="ts">
10      import type { TodayPage } from '@jet-app/app-store/api/models';
11  
12      import DefaultPage from '~/components/pages/DefaultPage.svelte';
13      import { setTodayCardLayoutContext } from '~/context/today-card-layout';
14  
15      export let page: TodayPage;
16  
17      $: {
18          setTodayCardLayoutContext(page);
19      }
20  </script>
21  
22  <DefaultPage {page} />