Skip to content

Commit

Permalink
unsupported
Browse files Browse the repository at this point in the history
  • Loading branch information
kchenturtles committed Dec 23, 2023
1 parent f4a85a8 commit 6b4f997
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions app/posts/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 } }) {

Expand Down Expand Up @@ -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;

0 comments on commit 6b4f997

Please sign in to comment.