trying to get nextjs to work

This commit is contained in:
2022-11-06 22:52:29 +01:00
parent 78b57dc4ad
commit 3ac968a63c
10 changed files with 103 additions and 40 deletions

View File

@@ -1,14 +1,14 @@
'use client-only';
import { Post } from '@/lib/getPosts';
import { FC } from 'react';
import { getPosts } from '@/lib/getPosts';
import { cookies } from 'next/headers';
import { use } from 'react';
import ReactMarkdown from 'react-markdown';
import remarkGfm from 'remark-gfm';
interface PostProps {
posts: Post[];
}
const Posts: FC<PostProps> = ({ posts }) => {
const Posts = () => {
const c = cookies();
const posts = use(getPosts());
return (
<>
{posts.map((p) => (