summaryrefslogtreecommitdiff
path: root/src/components/pages/TodayPage.svelte
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/pages/TodayPage.svelte')
-rw-r--r--src/components/pages/TodayPage.svelte22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/components/pages/TodayPage.svelte b/src/components/pages/TodayPage.svelte
new file mode 100644
index 0000000..3d38932
--- /dev/null
+++ b/src/components/pages/TodayPage.svelte
@@ -0,0 +1,22 @@
+<!--
+@component
+Page component for the "Today Page"
+
+This is required so that the correct layout of the cards within each `TodayCardShelf`
+can be computed at the page level, as the algorithm for stretching the correct cards
+in each shelf requires knowledge of the previously-rendered shelf
+-->
+<script lang="ts">
+ import type { TodayPage } from '@jet-app/app-store/api/models';
+
+ import DefaultPage from '~/components/pages/DefaultPage.svelte';
+ import { setTodayCardLayoutContext } from '~/context/today-card-layout';
+
+ export let page: TodayPage;
+
+ $: {
+ setTodayCardLayoutContext(page);
+ }
+</script>
+
+<DefaultPage {page} />