This commit is contained in:
suvodip ghosh
2025-04-22 13:46:38 +00:00
parent 10a2c0c2c3
commit 5a32c1a7d2
18 changed files with 2026 additions and 58 deletions

View File

@@ -11,7 +11,11 @@ export default function TopicDetail(props) {
return (
<div className="container mx-auto px-4 py-12">
<article className="max-w-4xl mx-auto">
<img src={props.topic.img} alt={props.topic.title} className="w-full h-96 object-cover rounded-lg mb-8" />
{
props.topic.img && (
<img src={props.topic.img} alt={props.topic.title} className="w-full h-96 object-cover rounded-lg mb-8" />
)
}
<h1 className="text-4xl font-bold text-[#6d9e37] mb-4">{props.topic.title}</h1>
<div className="font-light mb-8 text-justify prose max-w-none" dangerouslySetInnerHTML={{ __html: marked.parse(props.topic.content || '') }}></div>
</article>