random selection of project proposals
Deploy Vercel / deploy-preprod (push) Failing after 1m18s
Deploy Vercel / deploy-production (push) Has been skipped

This commit is contained in:
2026-07-08 09:31:35 +02:00
parent aadb43efb4
commit 5f41471108
2 changed files with 20 additions and 10 deletions
+7 -10
View File
@@ -1,6 +1,6 @@
import { notFound } from "next/navigation";
import { MDXRemote } from "next-mdx-remote/rsc";
import { getAllProjects, getProjectBySlug, getProjectSlugs } from "@/lib/projects/get-projects";
import { getProjectBySlug, getProjectSlugs, getRandomOtherProjects } from "@/lib/projects/get-projects";
import { mdxComponents } from "@/components/mdx/mdxComponents";
import { ProjectHero } from "@/app/[locale]/works/_components/ProjectHero";
import { ProjectMeta } from "@/app/[locale]/works/_components/ProjectMeta";
@@ -38,15 +38,12 @@ export default async function ProjectPage({ params }: props) {
notFound();
}
const otherProjects = getAllProjects(locale)
.filter((item: any) => item.slug !== slug && item.ready)
.slice(0, 2)
.map((item: any) => ({
slug: item.slug,
title: item.title,
description: item.description,
cover: item.cover,
}));
const otherProjects = getRandomOtherProjects(locale, slug, 2).map((item) => ({
slug: item.slug,
title: item.title,
description: item.description,
cover: item.cover,
}));
return (
<main className="bg-brand-beige">