Fix return for the LastProjects
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -5,7 +5,6 @@ import getProjects from '@/graphql/projects/getProjects.graphql';
|
||||
import getProjectPost from '@/graphql/projects/getProject.graphql';
|
||||
import getLastProjectsQuery from '@/graphql/projects/getLastProjects.graphql';
|
||||
import { getImageSize } from "@/lib/images";
|
||||
import ParserBlock from "markdown-it/lib/parser_block.mjs";
|
||||
|
||||
export async function getAllProjects(settings: GlobalSettings): Promise<ProjectPost[]> {
|
||||
const client = await createDirectusConnection();
|
||||
|
||||
Reference in New Issue
Block a user