From bce557cc2dc767628bed6aac87301a1be7c5431b Mon Sep 17 00:00:00 2001
From: rxliuli <rxliuli@gmail.com>
Date: Tue, 4 Nov 2025 05:03:50 +0800
Subject: init commit

---
 src/components/Page.svelte | 68 ++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 68 insertions(+)
 create mode 100644 src/components/Page.svelte

(limited to 'src/components/Page.svelte')

diff --git a/src/components/Page.svelte b/src/components/Page.svelte
new file mode 100644
index 0000000..5b44c06
--- /dev/null
+++ b/src/components/Page.svelte
@@ -0,0 +1,68 @@
+<script lang="ts">
+    import {
+        type Page,
+        hasVisionProUrl,
+        isAppEventDetailPage,
+        isArticlePage,
+        isChartsHubPage,
+        isGenericPage,
+        isSearchLandingPage,
+        isShelfBasedProductPage,
+        isTopChartsPage,
+        isTodayPage,
+        isSearchResultsPage,
+        isStaticMessagePage,
+        isSeeAllPage,
+        isErrorPage,
+    } from '~/jet/models';
+
+    import AppEventDetailPage from './pages/AppEventDetailPage.svelte';
+    import ArticlePage from './pages/ArticlePage.svelte';
+    import ChartsHubPage from './pages/ChartsHubPage.svelte';
+    import DefaultPage from './pages/DefaultPage.svelte';
+    import ErrorPage from './pages/ErrorPage.svelte';
+    import ProductPage from './pages/ProductPage.svelte';
+    import VisionProPage from './pages/VisionProPage.svelte';
+    import StaticMessagePageComponent from './pages/StaticMessagePage.svelte';
+    import SearchLandingPage from './pages/SearchLandingPage.svelte';
+    import SearchResultsPage from './pages/SearchResultsPage.svelte';
+    import TopChartsPage from './pages/TopChartsPage.svelte';
+    import TodayPage from './pages/TodayPage.svelte';
+    import SeeAllPage from './pages/SeeAllPage.svelte';
+    import MetaTags from '~/components/structure/MetaTags.svelte';
+    import PageModal from '~/components/PageModal.svelte';
+
+    export let page: Page;
+</script>
+
+<MetaTags {page} />
+
+<PageModal />
+
+{#if isAppEventDetailPage(page)}
+    <AppEventDetailPage {page} />
+{:else if isArticlePage(page)}
+    <ArticlePage {page} />
+{:else if isChartsHubPage(page)}
+    <ChartsHubPage {page} />
+{:else if isSearchLandingPage(page)}
+    <SearchLandingPage {page} />
+{:else if isSearchResultsPage(page)}
+    <SearchResultsPage {page} />
+{:else if isShelfBasedProductPage(page)}
+    <ProductPage {page} />
+{:else if isTopChartsPage(page)}
+    <TopChartsPage {page} />
+{:else if isGenericPage(page) && hasVisionProUrl(page)}
+    <VisionProPage {page} />
+{:else if isTodayPage(page)}
+    <TodayPage {page} />
+{:else if isStaticMessagePage(page)}
+    <StaticMessagePageComponent {page} />
+{:else if isSeeAllPage(page)}
+    <SeeAllPage {page} />
+{:else if isErrorPage(page)}
+    <ErrorPage {page} />
+{:else}
+    <DefaultPage {page} />
+{/if}
-- 
cgit v1.2.3

