Optimize homepage query, Portable Text formatting, Events

This commit is contained in:
Antoine Phan
2025-06-09 15:35:44 -04:00
committed by Antoine Phan
parent d2b995ac6d
commit 5eb74dd06f
6 changed files with 53 additions and 26 deletions

View File

@@ -1,7 +1,7 @@
import { getFromCMS } from 'utils/utils.js';
// needs to concat and format this text
const query = `*[_type == "events"]{
const eventQuery = `*[_type == "events"]{
name,
category,
date,
@@ -12,6 +12,6 @@ const query = `*[_type == "events"]{
export const load = async () => {
return {
events: await getFromCMS(query)
events: await getFromCMS(eventQuery),
};
};