import React from 'react'; import Markdown from 'react-markdown'; import { Card, CardBody } from '@nextui-org/card'; import remarkGfm from 'remark-gfm'; import remarkToc from 'remark-toc'; import remarkFrontmatter from 'remark-frontmatter'; import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter'; import { oneDark } from 'react-syntax-highlighter/dist/esm/styles/prism'; import rehypeRaw from 'rehype-raw'; import rehypeSanitize from 'rehype-sanitize'; import Headers from '@/app/blog/post/[id]/Headers'; import Footer from '@/app/blog/post/[id]/Footer'; import { fetchNocturneApi } from '@/app/blog/api'; type Props = { id: string } async function PostCard(props: Props) { try { const res = await fetchNocturneApi(`/get_post/${ props.id }`); const ret: any = await res.json(); return (
{/* card headers */ } {/* card body */ } { String((children as any)['props']['children']).replace(/\n$/, '') } ); } else { return (
                                            
                                                { children }
                                            
                                        
); } } } } >{ ret['content'] }
{/* card footer */ }
); } catch (e: any) { return
Fatal: { e.toString() }
; } } export default PostCard;