From 6b4f99732070a69330640114629c75baa2864b84 Mon Sep 17 00:00:00 2001 From: kchenturtles <94144671+kchenturtles@users.noreply.github.com> Date: Sat, 23 Dec 2023 11:22:03 -0500 Subject: [PATCH] unsupported --- app/posts/[slug]/page.tsx | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/app/posts/[slug]/page.tsx b/app/posts/[slug]/page.tsx index 1ec7977..58bf1c7 100644 --- a/app/posts/[slug]/page.tsx +++ b/app/posts/[slug]/page.tsx @@ -3,7 +3,6 @@ import markdownToHtml from "../../../lib/markdownToHTML"; import styles from "./styles.module.css"; import Image from "next-image-export-optimizer"; import Link from "next/link"; -import { InferGetStaticPropsType, GetStaticProps, GetStaticPaths } from 'next'; async function Page({ params }: { params: { slug: string } }) { @@ -36,28 +35,4 @@ async function Page({ params }: { params: { slug: string } }) { ); } -export async function getStaticPaths() { - - var paths = getPostSlugs(); - - paths = paths.map((bit) => { return ("/posts/".concat(bit.replace(/\.md$/, ''))); }); - - return { - paths, - fallback: true, - } -} - -export async function getStaticProps({ params }: { params: { slug: string } }) { - console.log(params); - const slug = params.slug; - const post = await getPostBySlug(slug); - - return { - props: { - post, - }, - }; -} - export default Page; \ No newline at end of file