Office Hours query
This commit is contained in:
@@ -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: "",
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user