fix: resovle static page dynamic build
This commit is contained in:
parent
445d7122aa
commit
3e10f1ee9f
|
|
@ -8,6 +8,8 @@ interface EditClusterPageProps {
|
|||
}>;
|
||||
}
|
||||
|
||||
export const dynamic = 'force-dynamic';
|
||||
|
||||
export default async function EditClusterPage({ params }: EditClusterPageProps) {
|
||||
const { id } = await params;
|
||||
const cluster = await getClusterById(parseInt(id));
|
||||
|
|
|
|||
|
|
@ -11,6 +11,8 @@ interface ClusterDetailPageProps {
|
|||
}>;
|
||||
}
|
||||
|
||||
export const dynamic = 'force-dynamic';
|
||||
|
||||
export default async function ClusterDetailPage({ params }: ClusterDetailPageProps) {
|
||||
const { id } = await params;
|
||||
const cluster = await getClusterWithCustomers(parseInt(id));
|
||||
|
|
|
|||
|
|
@ -9,6 +9,8 @@ interface EditCustomerPageProps {
|
|||
}>;
|
||||
}
|
||||
|
||||
export const dynamic = 'force-dynamic';
|
||||
|
||||
export default async function EditCustomerPage({ params }: EditCustomerPageProps) {
|
||||
const { id } = await params;
|
||||
const [customer, clusters] = await Promise.all([
|
||||
|
|
|
|||
|
|
@ -14,6 +14,8 @@ interface CustomerDetailPageProps {
|
|||
}>;
|
||||
}
|
||||
|
||||
export const dynamic = 'force-dynamic';
|
||||
|
||||
export default async function CustomerDetailPage({ params }: CustomerDetailPageProps) {
|
||||
const { id } = await params;
|
||||
const customer = await getCustomerById(parseInt(id));
|
||||
|
|
|
|||
|
|
@ -2,6 +2,9 @@ import { notFound } from 'next/navigation';
|
|||
import { CustomerForm } from '@/components/customers/customer-form';
|
||||
import { listClusters } from '@/lib/actions/clusters';
|
||||
|
||||
// Force dynamic rendering to ensure data is fetched at request time
|
||||
export const dynamic = 'force-dynamic';
|
||||
|
||||
export default async function NewCustomerPage() {
|
||||
const clusters = await listClusters();
|
||||
|
||||
|
|
|
|||
|
|
@ -8,6 +8,8 @@ interface EditReleasePageProps {
|
|||
}>;
|
||||
}
|
||||
|
||||
export const dynamic = 'force-dynamic';
|
||||
|
||||
export default async function EditReleasePage({ params }: EditReleasePageProps) {
|
||||
const { id } = await params;
|
||||
const release = await getReleaseById(parseInt(id));
|
||||
|
|
|
|||
|
|
@ -37,6 +37,8 @@ function getStatusColor(status: string) {
|
|||
return statusColors[status] || 'bg-slate-100 text-slate-800';
|
||||
}
|
||||
|
||||
export const dynamic = 'force-dynamic';
|
||||
|
||||
export default async function ReleaseDetailPage({ params }: ReleaseDetailPageProps) {
|
||||
const { id } = await params;
|
||||
const releaseId = parseInt(id);
|
||||
|
|
|
|||
Loading…
Reference in New Issue