Fix return for the LastProjects

This commit is contained in:
itsfinniii
2026-04-12 20:13:08 +02:00
parent 8bc95d0f50
commit 2374a6bd22
2 changed files with 16 additions and 15 deletions

View File

@@ -46,20 +46,22 @@ const size = calculateSizeClasses(projects.amount, lastProjects.length);
{ lastProjects.map((project) => {
const imageSize = getImageSize(project.searchEngine.thumbnail.width, project.searchEngine.thumbnail.height, 0.5);
<a href={getProjectRoute(settings.project, project)} class={`${size} flex flex-col gap-2`}>
<Image
src={getImageUrl(project.searchEngine.thumbnail.url)}
alt={project.title}
class="flex rounded-2xl shadow-md w-full"
width={imageSize.width}
height={imageSize.height}
/>
<h4 class="font-semibold text-[28px]">{project.title}</h4>
<div class="flex flex-row items-center gap-1.5 text-neutral-900 text-sm">
<CalendarIcon width={20} height={20} />
<div>{project.date}</div>
</div>
</a>
return (
<a href={getProjectRoute(settings.project, project)} class={`${size} flex flex-col gap-2`}>
<Image
src={getImageUrl(project.searchEngine.thumbnail.url)}
alt={project.title}
class="flex rounded-2xl shadow-md w-full"
width={imageSize.width}
height={imageSize.height}
/>
<h4 class="font-semibold text-[28px]">{project.title}</h4>
<div class="flex flex-row items-center gap-1.5 text-neutral-900 text-sm">
<CalendarIcon width={20} height={20} />
<div>{project.date}</div>
</div>
</a>
)
}) }
</div>
</div>