add sub git and git-tools

This commit is contained in:
2022-11-06 21:07:22 +01:00
commit 9a0c882fe4
18 changed files with 3803 additions and 0 deletions

24
app/posts.tsx Normal file
View File

@@ -0,0 +1,24 @@
import { getPosts, Post } from '@/lib/getPosts';
import { FC, use } from 'react';
interface PostProps {
posts: Post[];
}
const Posts: FC<PostProps> = ({ posts }) => {
return (
<>
{posts.map((p) => (
<div className="space-y-2 text-white">
<p className="font-bold">{p.author.name}</p>
<p>{p.title}</p>
{p.message &&
p.message
.split('\n')
.map((para, i) => para && <p key={i}>{para}</p>)}
</div>
))}
</>
);
};
export default Posts;