Skip to content

Commit 2774669

Browse files
committed
[TOOL-3044] Remove static generation of changelog pages
1 parent 332536b commit 2774669

File tree

4 files changed

+4
-14
lines changed

4 files changed

+4
-14
lines changed

apps/portal/src/app/changelog/[slug]/page.tsx

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import { cn } from "@/lib/utils";
44
import { notFound } from "next/navigation";
55
import ReactHtmlParser from "react-html-parser";
6-
import { fetchChangeLogs, fetchPost } from "../ghost";
6+
import { fetchPost } from "../ghost";
77
import "./styles.css";
88
import { ArrowLeft } from "lucide-react";
99
import Link from "next/link";
@@ -72,13 +72,3 @@ export default async function Page(props: {
7272
</div>
7373
);
7474
}
75-
76-
export async function generateStaticParams() {
77-
const changelogs = await fetchChangeLogs();
78-
79-
return changelogs.map((changelog) => {
80-
return {
81-
slug: changelog.slug,
82-
};
83-
});
84-
}

apps/portal/src/app/changelog/utils/transform.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export const transform: Transform = (node, index: number) => {
4949
const level = Number.parseInt(node.name[1] || "");
5050

5151
return (
52-
<Heading level={level} id="#" anchorClassName="mt-10">
52+
<Heading level={level} anchorClassName="mt-10" id={undefined}>
5353
{getChildren()}
5454
</Heading>
5555
);

apps/portal/src/components/Document/Heading.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { Anchor } from "../ui/Anchor";
33

44
export function Heading(props: {
55
children: React.ReactNode;
6-
id: string;
6+
id: string | undefined;
77
level: number;
88
className?: string;
99
anchorClassName?: string;

apps/portal/src/components/ui/Anchor.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { cn } from "@/lib/utils";
44
import { Link as LinkIcon } from "lucide-react";
55

66
export function Anchor(props: {
7-
id: string;
7+
id: string | undefined;
88
children: React.ReactNode;
99
className?: string;
1010
}) {

0 commit comments

Comments
 (0)