summaryrefslogtreecommitdiffhomepage
path: root/packages/web/src/pages
diff options
context:
space:
mode:
authorJay V <[email protected]>2025-06-10 11:52:02 -0500
committerJay V <[email protected]>2025-06-10 11:52:02 -0500
commit0e58f488df63f2143fdc5efa9ea85b1751bf7c10 (patch)
treeb5cbbce129948e96987910d6132ea541c8e9da86 /packages/web/src/pages
parentfa7416687bfe67d47b187c5b9c0dc8a5d2a95781 (diff)
downloadopencode-0e58f488df63f2143fdc5efa9ea85b1751bf7c10.tar.gz
opencode-0e58f488df63f2143fdc5efa9ea85b1751bf7c10.zip
moving share urls
Diffstat (limited to 'packages/web/src/pages')
-rw-r--r--packages/web/src/pages/s/[id].astro (renamed from packages/web/src/pages/s/index.astro)10
1 files changed, 8 insertions, 2 deletions
diff --git a/packages/web/src/pages/s/index.astro b/packages/web/src/pages/s/[id].astro
index a6b74ecde..523fa7e6c 100644
--- a/packages/web/src/pages/s/index.astro
+++ b/packages/web/src/pages/s/[id].astro
@@ -6,7 +6,7 @@ import Share from "../../components/Share.tsx";
const apiUrl = import.meta.env.VITE_API_URL;
-const id = Astro.url.searchParams.get('id')
+const { id } = Astro.params;
const res = await fetch(`${apiUrl}/share_data?id=${id}`);
const data = await res.json();
@@ -39,7 +39,13 @@ const ogImage = data.ogImage;
],
}}
>
- <Share api={apiUrl} info={data.info} messages={data.messages} client:only="solid" />
+ <Share
+ id={id}
+ api={apiUrl}
+ info={data.info}
+ messages={data.messages}
+ client:only="solid"
+ />
</StarlightPage>
<style is:global>