Office Hours query

This commit is contained in:
Antoine Phan
2025-06-05 18:07:39 +01:00
parent 28f4284406
commit ca77f40442

View File

@@ -1,12 +1,19 @@
import { getFromCMS } from 'utils/utils.js'; import { getFromCMS } from 'utils/utils.js';
// needs to concat and format this text // needs to concat and format this text
const query = `*[_type == "homepage"].description[].children[].text`; const descQuery = `*[_type == "homepage"].description[].children[].text`;
const ohQuery = `*[_type=="oh"].schedule[]{
day,
startTime,
endTime,
"host": member->name
}`;
export const load = async () => { export const load = async () => {
return { return {
description: await getFromCMS(query), description: await getFromCMS(descQuery),
ohs: "", ohs: await getFromCMS(ohQuery),
pictures: "", pictures: "",
FAQs: "", FAQs: "",
}; };