chore: run prettier on Astro files

This commit is contained in:
Oliver Davies 2023-01-08 19:25:23 +00:00
parent a489a2ca02
commit 40d8e58cce
17 changed files with 1005 additions and 330 deletions

View file

@ -1,42 +1,47 @@
---
interface Event {
date: string
location: string
name: string
online?: boolean
time: string
url?: string
date: string;
location: string;
name: string;
online?: boolean;
time: string;
url?: string;
}
interface Props {
events: Event[]
events: Event[];
}
const { events } = Astro.props
const { events } = Astro.props;
---
{events && (
<div>
<h2>Events</h2>
{
events && (
<div>
<ul class="ml-4 list-disc">
{events.map((event) => (
<li>
{event.url ? (<a class="link" href={event.url}>{event.name}</a>) : event.name}
<h2>Events</h2>
{event.location && `in ${event.location}`}
- {new Date(event.date).toLocaleDateString('en-GB', {
day: 'numeric',
month: 'long',
year: 'numeric',
})}
{event.online && '(online)'}
</li>
))}
</ul>
<div>
<ul class="ml-4 list-disc">
{events.map((event) => (
<li>
{event.url ? (
<a class="link" href={event.url}>
{event.name}
</a>
) : (
event.name
)}
{event.location && `in ${event.location}`}-{" "}
{new Date(event.date).toLocaleDateString("en-GB", {
day: "numeric",
month: "long",
year: "numeric",
})}
{event.online && "(online)"}
</li>
))}
</ul>
</div>
</div>
</div>
)}
)
}