mirror of
https://github.com/aljazceru/opencode.git
synced 2026-01-03 16:05:00 +01:00
moving share urls
This commit is contained in:
@@ -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>
|
||||
Reference in New Issue
Block a user