diff --git a/viewer-frontend/app/page.tsx b/viewer-frontend/app/page.tsx index bf43768..03e02a7 100644 --- a/viewer-frontend/app/page.tsx +++ b/viewer-frontend/app/page.tsx @@ -4,6 +4,9 @@ import { HomePageContent } from './HomePageContent'; import { Photo } from '@prisma/client'; import { serializePhotos, serializePeople, serializeTags } from '@/lib/serialize'; +// Force dynamic rendering to prevent database queries during build +export const dynamic = 'force-dynamic'; + async function getAllPeople() { try { return await prisma.person.findMany({ diff --git a/viewer-frontend/app/photo/[id]/page.tsx b/viewer-frontend/app/photo/[id]/page.tsx index 7bbe307..dd63e87 100644 --- a/viewer-frontend/app/photo/[id]/page.tsx +++ b/viewer-frontend/app/photo/[id]/page.tsx @@ -3,6 +3,9 @@ import { PhotoViewerClient } from '@/components/PhotoViewerClient'; import { prisma } from '@/lib/db'; import { serializePhoto, serializePhotos } from '@/lib/serialize'; +// Force dynamic rendering to prevent database queries during build +export const dynamic = 'force-dynamic'; + async function getPhoto(id: number) { try { const photo = await prisma.photo.findUnique({ diff --git a/viewer-frontend/app/search/page.tsx b/viewer-frontend/app/search/page.tsx index f83f392..379cddd 100644 --- a/viewer-frontend/app/search/page.tsx +++ b/viewer-frontend/app/search/page.tsx @@ -3,6 +3,9 @@ import { prisma } from '@/lib/db'; import { SearchContent } from './SearchContent'; import { PhotoGrid } from '@/components/PhotoGrid'; +// Force dynamic rendering to prevent database queries during build +export const dynamic = 'force-dynamic'; + async function getAllPeople() { try { return await prisma.person.findMany({