chore: Enforce dynamic rendering in viewer frontend pages to optimize build process
Some checks failed
CI / skip-ci-check (push) Successful in 1m27s
CI / skip-ci-check (pull_request) Successful in 1m27s
CI / python-lint (push) Has been cancelled
CI / test-backend (push) Has been cancelled
CI / build (push) Has been cancelled
CI / secret-scanning (push) Has been cancelled
CI / dependency-scan (push) Has been cancelled
CI / sast-scan (push) Has been cancelled
CI / workflow-summary (push) Has been cancelled
CI / lint-and-type-check (push) Has been cancelled
CI / lint-and-type-check (pull_request) Successful in 2m6s
CI / python-lint (pull_request) Successful in 1m54s
CI / test-backend (pull_request) Successful in 2m38s
CI / build (pull_request) Successful in 2m24s
CI / secret-scanning (pull_request) Successful in 1m40s
CI / dependency-scan (pull_request) Successful in 1m33s
CI / sast-scan (pull_request) Successful in 2m44s
CI / workflow-summary (pull_request) Successful in 1m26s
Some checks failed
CI / skip-ci-check (push) Successful in 1m27s
CI / skip-ci-check (pull_request) Successful in 1m27s
CI / python-lint (push) Has been cancelled
CI / test-backend (push) Has been cancelled
CI / build (push) Has been cancelled
CI / secret-scanning (push) Has been cancelled
CI / dependency-scan (push) Has been cancelled
CI / sast-scan (push) Has been cancelled
CI / workflow-summary (push) Has been cancelled
CI / lint-and-type-check (push) Has been cancelled
CI / lint-and-type-check (pull_request) Successful in 2m6s
CI / python-lint (pull_request) Successful in 1m54s
CI / test-backend (pull_request) Successful in 2m38s
CI / build (pull_request) Successful in 2m24s
CI / secret-scanning (pull_request) Successful in 1m40s
CI / dependency-scan (pull_request) Successful in 1m33s
CI / sast-scan (pull_request) Successful in 2m44s
CI / workflow-summary (pull_request) Successful in 1m26s
This commit adds dynamic rendering to the main page, photo detail page, and search page in the viewer frontend. By enforcing dynamic rendering, we prevent database queries during the build process, enhancing application performance and reliability. These changes contribute to a more efficient development workflow and improve the overall user experience.
This commit is contained in:
parent
a639189c23
commit
2020e84f94
@ -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({
|
||||
|
||||
@ -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({
|
||||
|
||||
@ -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({
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user