사주 풀이 고도화, NAS 배포 자동화
This commit is contained in:
33
app/result/saved/[id]/SavedInterpretation.tsx
Normal file
33
app/result/saved/[id]/SavedInterpretation.tsx
Normal file
@@ -0,0 +1,33 @@
|
||||
'use client';
|
||||
|
||||
import ReactMarkdown from 'react-markdown';
|
||||
import remarkGfm from 'remark-gfm';
|
||||
import { AccordionItem, parseSections, SECTION_ICONS } from '@/components/AccordionItem';
|
||||
|
||||
export default function SavedInterpretation({ interpretation }: { interpretation: string }) {
|
||||
const sections = parseSections(interpretation);
|
||||
|
||||
if (sections.length > 0) {
|
||||
return (
|
||||
<div className="space-y-3">
|
||||
{sections.map((section, idx) => (
|
||||
<AccordionItem
|
||||
key={idx}
|
||||
title={section.title}
|
||||
content={section.content}
|
||||
icon={SECTION_ICONS[idx] || '📌'}
|
||||
defaultOpen={idx === 0}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<article className="prose prose-lg max-w-none prose-indigo">
|
||||
<ReactMarkdown remarkPlugins={[remarkGfm]}>
|
||||
{interpretation}
|
||||
</ReactMarkdown>
|
||||
</article>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user