diff --git a/src/components/Button.svelte b/src/components/Button.svelte index fb195ff..b5b4a7d 100644 --- a/src/components/Button.svelte +++ b/src/components/Button.svelte @@ -1,5 +1,5 @@ - +

{@render children()}

+ + diff --git a/src/lib/schemas.ts b/src/lib/schemas.ts index 15f858c..fddc07f 100644 --- a/src/lib/schemas.ts +++ b/src/lib/schemas.ts @@ -46,4 +46,10 @@ export type CouncilMember = { yearProgram: string; }; +export type Resource = { + title: string; + url: string; + description: string; +} + export type Redirect = { shortname: string; url: string }; diff --git a/src/routes/resources/+page.server.ts b/src/routes/resources/+page.server.ts index 3d1dfea..b627263 100644 --- a/src/routes/resources/+page.server.ts +++ b/src/routes/resources/+page.server.ts @@ -1,3 +1,4 @@ +import type { Resource } from '$lib/schemas'; import { getFromCMS } from '$lib/utils.js'; // needs to concat and format this text @@ -5,11 +6,11 @@ const query = `*[_type == "resources"]{ title, url, description, - "lastUpdated":_updatedAt }`; export const load = async () => { + const resources: Resource[] = await getFromCMS(query); return { - resources: await getFromCMS(query) + resources: resources }; }; diff --git a/src/routes/resources/+page.svelte b/src/routes/resources/+page.svelte index ac49ed6..0ba6188 100644 --- a/src/routes/resources/+page.svelte +++ b/src/routes/resources/+page.svelte @@ -1,4 +1,5 @@ @@ -8,12 +9,11 @@

Resources

-

Resources for ECSE students at McGill University, presented by ECSESS!

- - {#each data.resources as re} - {re.title}
- {re.url}
- {re.description}
-

==============

- {/each} +
+ {#each data.resources as re} + + {re.description} + + {/each} +