feat(ST-1114): add shared Markdown wrapper, apply to task-detail and story-dialog

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Janpeter Visser 2026-04-30 00:36:08 +02:00
parent 73c27ac43e
commit 353f21d69a
3 changed files with 25 additions and 11 deletions

View file

@ -3,8 +3,7 @@
import { useRef, useState, useTransition } from 'react'
import Link from 'next/link'
import { toast } from 'sonner'
import ReactMarkdown from 'react-markdown'
import remarkGfm from 'remark-gfm'
import { Markdown } from '@/components/markdown'
import { Dialog, DialogContent, DialogHeader, DialogTitle } from '@/components/ui/dialog'
import { Badge } from '@/components/ui/badge'
import { Button } from '@/components/ui/button'
@ -134,14 +133,7 @@ function TaskDetailContent({ task, productId, isDemo, onClose }: TaskDetailConte
{task.description && (
<div>
<p className="text-xs font-medium text-muted-foreground mb-1.5">Beschrijving</p>
<div className="prose prose-sm dark:prose-invert max-w-none text-foreground">
<ReactMarkdown
remarkPlugins={[remarkGfm]}
disallowedElements={['script', 'iframe']}
>
{task.description}
</ReactMarkdown>
</div>
<Markdown className="text-foreground">{task.description}</Markdown>
</div>
)}