Skip to content

Commit 6469fd5

Browse files
committed
Fix newly added pages not awaiting the params and searchParams (#5311)
1 parent 6030bf1 commit 6469fd5

File tree

4 files changed

+26
-19
lines changed
  • apps/dashboard/src/app
    • (dashboard)/dashboard/connect/ecosystem/[slug]/(active)
    • team/[team_slug]/[project_slug]/connect/ecosystem/[slug]/(active)

4 files changed

+26
-19
lines changed

apps/dashboard/src/app/(dashboard)/dashboard/connect/ecosystem/[slug]/(active)/analytics/page.tsx

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,17 @@ import { FetchError } from "utils/error";
44
import type { Ecosystem } from "../../../types";
55
import { EcosystemAnalyticsPage } from "./components/EcosystemAnalyticsPage";
66

7-
export default async function Page({
8-
params,
9-
searchParams,
10-
}: {
11-
params: { slug: string };
12-
searchParams: {
7+
export default async function Page(props: {
8+
params: Promise<{ slug: string }>;
9+
searchParams: Promise<{
1310
interval?: "day" | "week";
1411
range?: Range;
15-
};
12+
}>;
1613
}) {
14+
const [params, searchParams] = await Promise.all([
15+
props.params,
16+
props.searchParams,
17+
]);
1718
const ecosystem = await getEcosystem(params.slug);
1819

1920
return (
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import { EcosystemPermissionsPage } from "./components/client/EcosystemPermissionsPage";
22

3-
export default function Page({ params }: { params: { slug: string } }) {
4-
return <EcosystemPermissionsPage params={params} />;
3+
export default async function Page({
4+
params,
5+
}: { params: Promise<{ slug: string }> }) {
6+
return <EcosystemPermissionsPage params={await params} />;
57
}

apps/dashboard/src/app/team/[team_slug]/[project_slug]/connect/ecosystem/[slug]/(active)/analytics/page.tsx

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,22 @@ import { fetchApiServer } from "data/analytics/fetch-api-server";
44
import { FetchError } from "utils/error";
55
import { EcosystemAnalyticsPage } from "../../../../../../../../(dashboard)/dashboard/connect/ecosystem/[slug]/(active)/analytics/components/EcosystemAnalyticsPage";
66

7-
export default async function Page({
8-
params,
9-
searchParams,
10-
}: {
11-
params: {
7+
export default async function Page(props: {
8+
params: Promise<{
129
slug: string;
1310
team_slug: string;
1411
project_slug: string;
15-
};
16-
searchParams: {
12+
}>;
13+
searchParams: Promise<{
1714
interval?: "day" | "week";
1815
range?: Range;
19-
};
16+
}>;
2017
}) {
18+
const [params, searchParams] = await Promise.all([
19+
props.params,
20+
props.searchParams,
21+
]);
22+
2123
const ecosystem = await getEcosystem(params.slug);
2224
return (
2325
<EcosystemAnalyticsPage
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import { EcosystemPermissionsPage } from "../../../../../../../../(dashboard)/dashboard/connect/ecosystem/[slug]/(active)/configuration/components/client/EcosystemPermissionsPage";
22

3-
export default function Page({ params }: { params: { slug: string } }) {
4-
return <EcosystemPermissionsPage params={params} />;
3+
export default async function Page({
4+
params,
5+
}: { params: Promise<{ slug: string }> }) {
6+
return <EcosystemPermissionsPage params={await params} />;
57
}

0 commit comments

Comments
 (0)