Content retrival on all pages

This commit is contained in:
Antoine Phan
2025-06-05 17:51:43 +01:00
committed by Antoine Phan
parent dec7e70c43
commit 7ead9f397c
8 changed files with 65 additions and 16 deletions

View File

@@ -0,0 +1,15 @@
import { getFromCMS } from 'utils/utils.js';
// needs to concat and format this text
const query = `*[_type == "resources"]{
title,
url,
description,
"lastUpdated":_updatedAt
}`;
export const load = async () => {
return {
resources: await getFromCMS(query)
};
};