fix: build and test stability for design overhaul
Some checks failed
Dev Deployment (Zero Downtime) / deploy-dev (push) Failing after 9m19s
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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user