mirror of
https://github.com/aljazceru/opencode.git
synced 2026-01-09 10:54:59 +01:00
ssr sync
This commit is contained in:
@@ -8,12 +8,10 @@ import Share from "../../components/Share.tsx";
|
||||
const apiUrl = import.meta.env.VITE_API_URL;
|
||||
|
||||
const id = Astro.url.searchParams.get('id')
|
||||
const res = await fetch(`${apiUrl}/share_messages?id=${id}`);
|
||||
const res = await fetch(`${apiUrl}/share_data?id=${id}`);
|
||||
const data = await res.json();
|
||||
|
||||
console.log(data.info)
|
||||
|
||||
const title = "Share";
|
||||
const title = data.info.title;
|
||||
|
||||
const encodedTitle = encodeURIComponent(
|
||||
Base64.encode(
|
||||
@@ -58,7 +56,7 @@ const ogImageUrl = `${cardService}/opencode-share/${encodedTitle}.png?cost=${cos
|
||||
],
|
||||
}}
|
||||
>
|
||||
<Share api={apiUrl} data={data.messages} client:only="solid" />
|
||||
<Share api={apiUrl} info={data.info} messages={data.messages} client:only="solid" />
|
||||
</StarlightPage>
|
||||
|
||||
<style is:global>
|
||||
|
||||
Reference in New Issue
Block a user