prefetch posts

Signed-off-by: Max Schmidt <max.schmidt@outlook.de>
This commit is contained in:
Max Schmidt 2023-08-15 21:09:46 +02:00
parent fd20d085ba
commit 5ac061ca7d

View File

@ -25,7 +25,7 @@ const posts = await getPosts();
{
posts.length > 0 ? (
posts.map((post) => (
<a href={`/posts/${post.id}/`}>
<a href={`/posts/${post.id}/`} rel="prefetch">
<article class="text-gray bg-gray-light px-5 py-3 rounded-md shadow-md w-64 text-center hover:-translate-y-1 transition-transform">
<h3 class="font-bold text-lg" transition:name=`title-${post.id}`>{post.title}</h3>
{post.publishedDate && (