Resolves empty events
This commit is contained in:
@@ -10,7 +10,7 @@ const eventQuery = `*[_type == "events"]{
|
|||||||
"lastUpdated": _updatedAt,
|
"lastUpdated": _updatedAt,
|
||||||
}`;
|
}`;
|
||||||
|
|
||||||
export const load = async () => {
|
export const load = async () => {
|
||||||
return {
|
return {
|
||||||
events: await getFromCMS(eventQuery),
|
events: await getFromCMS(eventQuery),
|
||||||
};
|
};
|
||||||
@@ -13,8 +13,10 @@
|
|||||||
<p>{event.name}</p>
|
<p>{event.name}</p>
|
||||||
<p>{event.date}</p>
|
<p>{event.date}</p>
|
||||||
<p>{event.location}</p>
|
<p>{event.location}</p>
|
||||||
<PortableText value={event.description} />
|
{#if event.description}
|
||||||
Category:
|
<PortableText value={event.description} />
|
||||||
|
{/if}
|
||||||
|
Category:
|
||||||
<div class="list">
|
<div class="list">
|
||||||
<ul class="list-inside list-disc space-y-2">
|
<ul class="list-inside list-disc space-y-2">
|
||||||
{#each event.category as cat}
|
{#each event.category as cat}
|
||||||
|
|||||||
Reference in New Issue
Block a user