foundation for posts
This commit is contained in:
@@ -1,10 +1,17 @@
|
||||
export default function PostRow() {
|
||||
import type { Post } from "../utils/types";
|
||||
|
||||
export default function PostRow({ post }: { post: Post }) {
|
||||
return (
|
||||
<a href="" className="hover:underline">
|
||||
<div>
|
||||
<h1>This is a test post</h1>
|
||||
<p>This is a test post description to show how cool it is</p>
|
||||
</div>
|
||||
</a>
|
||||
<div className="block">
|
||||
<a href={`/post/${post.slug}`} className="hover:underline">
|
||||
<div>
|
||||
<h1>{post.title}</h1>
|
||||
<p>{post.description}</p>
|
||||
<p className="text-xs opacity-50">
|
||||
Posted on {new Date(post.createdAt).toLocaleString()}
|
||||
</p>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user