This commit is contained in:
parent
3b46305c63
commit
17c86c0926
|
@ -8,6 +8,8 @@ import Post from "@/components/Post.astro";
|
||||||
|
|
||||||
const { entry } = Astro.props;
|
const { entry } = Astro.props;
|
||||||
|
|
||||||
|
const host = import.meta.env.PROD ? import.meta.env.SITE : "http://localhost";
|
||||||
|
|
||||||
export async function getStaticPaths() {
|
export async function getStaticPaths() {
|
||||||
const blogEntries = await getCollection("blog");
|
const blogEntries = await getCollection("blog");
|
||||||
return blogEntries.map((entry) => ({
|
return blogEntries.map((entry) => ({
|
||||||
|
@ -33,7 +35,7 @@ export async function getStaticPaths() {
|
||||||
<Header />
|
<Header />
|
||||||
<Post post={entry} componentType="full" />
|
<Post post={entry} componentType="full" />
|
||||||
<div
|
<div
|
||||||
hx-get=`http://localhost:8000/forms/emoji?postId=${entry.id}`
|
hx-get=`${host}/api/forms/emoji?postId=${entry.id}`
|
||||||
hx-trigger="load"
|
hx-trigger="load"
|
||||||
hx-swap="innerHTML"
|
hx-swap="innerHTML"
|
||||||
>
|
>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user