fix(build): mark Payload-fetching pages as force-dynamic
Static prerender at build time fails when PAYLOAD_SECRET/DATABASE_URI are unset. About/Projects/Contact + project detail all read from Payload at request time — make that explicit.
This commit is contained in:
@@ -6,6 +6,7 @@ import { RichText } from "@payloadcms/richtext-lexical/react";
|
|||||||
import { GridOverlay, TechChip } from "@/components/site";
|
import { GridOverlay, TechChip } from "@/components/site";
|
||||||
|
|
||||||
export const metadata: Metadata = { title: "About" };
|
export const metadata: Metadata = { title: "About" };
|
||||||
|
export const dynamic = "force-dynamic";
|
||||||
|
|
||||||
type MediaDoc = {
|
type MediaDoc = {
|
||||||
url?: string | null;
|
url?: string | null;
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import { GridOverlay, StatusTerminal } from "@/components/site";
|
|||||||
import { ContactForm } from "./ContactForm";
|
import { ContactForm } from "./ContactForm";
|
||||||
|
|
||||||
export const metadata: Metadata = { title: "Contact" };
|
export const metadata: Metadata = { title: "Contact" };
|
||||||
|
export const dynamic = "force-dynamic";
|
||||||
|
|
||||||
const ICON_MAP = {
|
const ICON_MAP = {
|
||||||
email: Mail,
|
email: Mail,
|
||||||
|
|||||||
@@ -8,6 +8,8 @@ import { RichText } from "@payloadcms/richtext-lexical/react";
|
|||||||
import { GridOverlay, TechChip } from "@/components/site";
|
import { GridOverlay, TechChip } from "@/components/site";
|
||||||
import type { Project, Media } from "@/payload-types";
|
import type { Project, Media } from "@/payload-types";
|
||||||
|
|
||||||
|
export const dynamic = "force-dynamic";
|
||||||
|
|
||||||
type Params = { slug: string };
|
type Params = { slug: string };
|
||||||
|
|
||||||
function isMedia(val: unknown): val is Media {
|
function isMedia(val: unknown): val is Media {
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ export const metadata: Metadata = {
|
|||||||
description:
|
description:
|
||||||
"A curated selection of industrial infrastructure, research platforms, and independent consultancy projects engineered for high-performance environments.",
|
"A curated selection of industrial infrastructure, research platforms, and independent consultancy projects engineered for high-performance environments.",
|
||||||
};
|
};
|
||||||
|
export const dynamic = "force-dynamic";
|
||||||
|
|
||||||
export default async function ProjectsIndexPage() {
|
export default async function ProjectsIndexPage() {
|
||||||
const payload = await getPayload({ config });
|
const payload = await getPayload({ config });
|
||||||
|
|||||||
Reference in New Issue
Block a user