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) { const { code, ret } = await fetchNocturneApi(`/get_post/${ props.id }`); if (code == 200) { return (
{/* card headers */ } {/* card body */ } { String((children as any)['props']['children']).replace(/\n$/, '') } ); } else { return (
                                            
                                                { children }
                                            
                                        
); } } } } >{ ret['content'] }
{/* card footer */ }
); } else { return
Fatal: { ret }
; } } export default PostCard;