fix: build and test stability for design overhaul
Some checks failed
Dev Deployment (Zero Downtime) / deploy-dev (push) Failing after 9m19s

Fixed missing types, import errors, and updated test suites to match the new editorial design. Verified Docker container build.
This commit is contained in:
2026-02-16 02:54:02 +01:00
parent 6213a4875a
commit 6f62b37c3a
17 changed files with 296 additions and 577 deletions

View File

@@ -1,5 +1,5 @@
import { prisma } from "@/lib/prisma";
import ProjectsPageClient from "@/app/_ui/ProjectsPageClient";
import ProjectsPageClient, { ProjectListItem } from "@/app/_ui/ProjectsPageClient";
import type { Metadata } from "next";
import { getLanguageAlternates, toAbsoluteUrl } from "@/lib/seo";
import { getProjects as getDirectusProjects } from "@/lib/directus";
@@ -40,14 +40,14 @@ export default async function ProjectsPage({
});
// Fetch from Directus
let directusProjects: any[] = [];
let directusProjects: ProjectListItem[] = [];
try {
const fetched = await getDirectusProjects(locale, { published: true });
if (fetched) {
directusProjects = fetched.map(p => ({
...p,
id: parseInt(p.id) || 0,
}));
})) as ProjectListItem[];
}
} catch (err) {
console.error("Directus projects fetch failed:", err);
@@ -68,7 +68,7 @@ export default async function ProjectsPage({
});
// Merge projects, prioritizing DB ones if slugs match
const allProjects = [...localizedDb];
const allProjects: any[] = [...localizedDb];
const dbSlugs = new Set(localizedDb.map(p => p.slug));
for (const dp of directusProjects) {