maj x build
Some checks failed
Build and Push App / build (push) Failing after 22s

This commit is contained in:
2026-04-15 22:43:32 +02:00
parent 889e70bfc0
commit 93a4c1df5e
3 changed files with 48 additions and 34 deletions

View File

@@ -3,6 +3,7 @@ import Link from 'next/link';
import { Play, FileText, Clock, Mic } from 'lucide-react';
import { prisma } from '../../lib/prisma';
import { InterviewType } from '@prisma/client';
import { MOCK_INTERVIEWS } from '../../lib/mockData';
export const revalidate = 3600;
@@ -19,10 +20,20 @@ export default async function AfroLifePage({ searchParams }: Props) {
where.type = filter;
}
const interviews = await prisma.interview.findMany({
where,
orderBy: { createdAt: 'desc' }
});
let interviews: any[] = [];
try {
interviews = await prisma.interview.findMany({
where,
orderBy: { createdAt: 'desc' }
});
} catch (error) {
console.error("Database connection failed on Afro Life page, using mock data.");
interviews = MOCK_INTERVIEWS.filter(i => filter === 'ALL' || i.type === filter).map(i => ({
...i,
createdAt: new Date(i.date),
}));
}
return (
<div className="bg-white min-h-screen">