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