Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions pages/posts/[slug].tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import Link from 'next/link';
import * as postsService from '../../lib/posts';
import PostType from '../../lib/types/post';

Expand All @@ -6,10 +7,19 @@ interface PropTypes {
}

const Post = ({ post }: PropTypes) => (
<div>
<h1>{post.data.title}</h1>
<div className="container mx-auto">
<div className=" text-center font-black text-3xl m-12">
<h1>{post.data.title}</h1>
</div>
<span>slug: {post.slug}</span>
<div dangerouslySetInnerHTML={{ __html: post.content }} />
<div className="hover:underline my-4">
<h2>
<Link href="/">
<a>Back to home</a>
</Link>
</h2>
</div>
</div>
);

Expand Down