Disable pre-ssg getPosts
continuous-integration/drone/push Build was killed Details

This commit is contained in:
toqvist 2024-04-04 15:24:43 +02:00
parent 6240a4104a
commit 974cee1cf4
2 changed files with 5 additions and 4 deletions

View File

@ -1,8 +1,9 @@
---
import BaseLayout from "@/layouts/BaseLayout.astro";
import { getPosts } from "@/utils/payload";
//import { getPosts } from "@/utils/payload";
//const posts = await getPosts();
import '../styles/global.css'
const posts = await getPosts();
---
<BaseLayout title="Astroad">
@ -22,7 +23,7 @@ const posts = await getPosts();
</p>
<h2 class="mt-6 font-bold text-2xl">Posts</h2>
<div class="flex gap-4 mt-3 flex-wrap">
{
<!-- {
posts.length > 0 ? (
posts.map((post) => (
<a href={`/posts/${post.id}/`}>
@ -39,7 +40,7 @@ const posts = await getPosts();
) : (
<p>Add Posts in Payloadcms</p>
)
}
} -->
</div>
</main>
</BaseLayout>