Render upcoming event markdown as HTML
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
import CalendarIcon from '@/icons/CalendarIcon.astro';
|
||||
import { Image } from 'astro:assets';
|
||||
import { upcomingEvent as UpcomingEvent } from './subcomponents/UpcomingEvent';
|
||||
import { markdownToHtml } from '@/lib/markdown';
|
||||
|
||||
interface Props {
|
||||
upcomingEvents: UpcomingEventsComponent;
|
||||
@@ -36,7 +37,15 @@ const upcomingEvents = Astro.props.upcomingEvents;
|
||||
) }
|
||||
</div>
|
||||
<div class="mt-3.5">
|
||||
<UpcomingEvent event={event} client:load />
|
||||
<UpcomingEvent
|
||||
client:load
|
||||
event={{
|
||||
title: event.title,
|
||||
description: markdownToHtml(event.description),
|
||||
startDate: event.startDate,
|
||||
endDate: event.endDate
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user