Skip to content

Commit a6e9c64

Browse files
committed
fix: update page imports and JSX rendering
1 parent b01e0a3 commit a6e9c64

File tree

5 files changed

+9
-12
lines changed

5 files changed

+9
-12
lines changed

apps/developer-hub/src/app/(docs)/[section]/[...slug]/page.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { DocumentationPage } from "@/src/components/Pages/DocumentationPage";
1+
export { DocumentationPage as default } from "@/src/components/Pages/DocumentationPage";
2+
23
import { source } from "@/src/source";
34
import type { Metadata } from "next";
45
import { notFound } from "next/navigation";
@@ -21,5 +22,3 @@ export async function generateMetadata(props: {
2122
description: page.data.description,
2223
} satisfies Metadata;
2324
}
24-
25-
export default DocumentationPage;

apps/developer-hub/src/app/(docs)/[section]/page.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { LandingPage } from "@/src/components/Pages/LandingPage";
1+
export { LandingPage as default } from "@/src/components/Pages/LandingPage";
2+
23
import { source } from "@/src/source";
34
import type { Metadata } from "next";
45
import { notFound } from "next/navigation";
@@ -20,5 +21,3 @@ export async function generateMetadata(props: {
2021
description: page.data.description,
2122
} satisfies Metadata;
2223
}
23-
24-
export default LandingPage;
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
import { Homepage } from "@/src/components/Pages/Homepage";
2-
3-
export default Homepage;
1+
export { Homepage as default } from "@/src/components/Pages/Homepage";

apps/developer-hub/src/components/Pages/DocumentationPage/index.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ export async function DocumentationPage(props: {
44
params: Promise<{ section: string; slug: string[] }>;
55
}) {
66
const params = await props.params;
7-
params.slug.unshift(params.section);
8-
return BasePage({ params });
7+
return (
8+
<BasePage params={{ ...params, slug: [params.section, ...params.slug] }} />
9+
);
910
}

apps/developer-hub/src/components/Pages/LandingPage/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ export async function LandingPage(props: {
44
params: Promise<{ section: string }>;
55
}) {
66
const params = await props.params;
7-
return BasePage({ params: { slug: [params.section] } });
7+
return <BasePage params={{ ...params, slug: [params.section] }} />;
88
}

0 commit comments

Comments
 (0)