fix: only get first page of surveys for survey list (#2186)

This commit is contained in:
Matti Nannt
2024-03-05 09:45:08 +01:00
committed by GitHub
parent 7c09dd9d10
commit f0647ce240

View File

@@ -42,7 +42,7 @@ export default async function SurveysPage({ params }) {
if (!environment) {
throw new Error("Environment not found");
}
const surveys = await getSurveys(params.environmentId);
const surveys = await getSurveys(params.environmentId, 1); // workaround for now; only get the first page; better approach is in development
const environments = await getEnvironments(product.id);
const otherEnvironment = environments.find((e) => e.type !== environment.type)!;