From c4418abf3a2d27417d581b1958c0d924bc499478 Mon Sep 17 00:00:00 2001 From: Xie Yanbo Date: Wed, 16 Oct 2024 16:30:23 +0800 Subject: [PATCH] fix: making requests duiring the next.js build process (#1382) --- client/app/(ee)/settings/logs/page.tsx | 2 ++ client/app/settings/datasets/[id]/page.tsx | 2 ++ client/app/settings/datasets/page.tsx | 2 ++ client/app/settings/page.tsx | 3 +++ client/app/settings/workspaces/addspaces/page.tsx | 2 ++ client/app/settings/workspaces/editspaces/page.tsx | 2 ++ client/app/settings/workspaces/page.tsx | 2 ++ 7 files changed, 15 insertions(+) diff --git a/client/app/(ee)/settings/logs/page.tsx b/client/app/(ee)/settings/logs/page.tsx index e6dd06304..90f266620 100644 --- a/client/app/(ee)/settings/logs/page.tsx +++ b/client/app/(ee)/settings/logs/page.tsx @@ -2,6 +2,8 @@ import React from "react"; import { GetLogs } from "@/services/logs"; import LogsCard from "./logs-card"; +export const dynamic = 'force-dynamic'; + export default async function Logs() { const data = await GetLogs(); diff --git a/client/app/settings/datasets/[id]/page.tsx b/client/app/settings/datasets/[id]/page.tsx index 6df949ae7..84600f608 100644 --- a/client/app/settings/datasets/[id]/page.tsx +++ b/client/app/settings/datasets/[id]/page.tsx @@ -3,6 +3,8 @@ import Link from "next/link"; import DatasetCard from "./DatasetCard"; import { GetDatasetDetails } from "@/services/datasets"; +export const dynamic = 'force-dynamic'; + interface PageProps { params: { id: string; diff --git a/client/app/settings/datasets/page.tsx b/client/app/settings/datasets/page.tsx index f741ecf73..1481e6903 100644 --- a/client/app/settings/datasets/page.tsx +++ b/client/app/settings/datasets/page.tsx @@ -7,6 +7,8 @@ import { Button } from "@/components/ui/button"; import { GetAllDataSets } from "@/services/datasets"; import AddNewCard from "./AddNewCard"; +export const dynamic = 'force-dynamic'; + export default async function Datasets() { const data = await GetAllDataSets(); diff --git a/client/app/settings/page.tsx b/client/app/settings/page.tsx index ae185208a..95880dc1a 100644 --- a/client/app/settings/page.tsx +++ b/client/app/settings/page.tsx @@ -1,4 +1,7 @@ import { redirect } from "next/navigation"; + +export const dynamic = 'force-dynamic'; + export default function Home() { redirect("/settings/datasets"); } diff --git a/client/app/settings/workspaces/addspaces/page.tsx b/client/app/settings/workspaces/addspaces/page.tsx index 8d6aba89a..3f1fadc8f 100644 --- a/client/app/settings/workspaces/addspaces/page.tsx +++ b/client/app/settings/workspaces/addspaces/page.tsx @@ -4,6 +4,8 @@ import { GetAllDataSets } from "@/services/datasets"; import AddSpaceCard from "./AddSpaceCard"; import { Button } from "@/components/ui/button"; +export const dynamic = 'force-dynamic'; + export default async function AddSpaces() { const data = await GetAllDataSets(); diff --git a/client/app/settings/workspaces/editspaces/page.tsx b/client/app/settings/workspaces/editspaces/page.tsx index 535383dd3..aa84ccc55 100644 --- a/client/app/settings/workspaces/editspaces/page.tsx +++ b/client/app/settings/workspaces/editspaces/page.tsx @@ -4,6 +4,8 @@ import { GetAllDataSets } from "@/services/datasets"; import EditSpaceCard from "./EditSpaceCard"; import { GetWorkspaceDetails } from "@/services/spaces"; +export const dynamic = 'force-dynamic'; + export default async function EditWorkSpaces({ searchParams }) { const data = await GetAllDataSets(); const workspaceDetails = await GetWorkspaceDetails(searchParams.id); diff --git a/client/app/settings/workspaces/page.tsx b/client/app/settings/workspaces/page.tsx index b9c546f28..5de7a53ce 100644 --- a/client/app/settings/workspaces/page.tsx +++ b/client/app/settings/workspaces/page.tsx @@ -6,6 +6,8 @@ import AppTooltip from "@/components/AppTooltip"; import { Button } from "@/components/ui/button"; import { GetAllWorkspaces } from "@/services/spaces"; +export const dynamic = 'force-dynamic'; + export default async function WorkSpaces() { const data = await GetAllWorkspaces();