import Markdown from 'react-markdown'
const eventBlock = events => events.join(" \n")
const EventGroup = ({ type='info', events=[] }) => events.length > 0 ? (
{type}
{eventBlock(events)}
) : null
const order = [
'error',
'warning',
'info',
'debug'
]
const Events = props => props?.draft?.events
? (
{order.map(type => (props.draft.events[type].length > 0)
? (
-
{type}
{type === 'debug' ? '' : |}
) : (
-
{type}
{type === 'debug' ? '' : |}
)
)}
{order.map(type =>
)}
) : null
export default Events