Update links type for events

This commit is contained in:
2025-12-25 22:18:51 -05:00
parent b70337e949
commit 157bdec9ea
2 changed files with 19 additions and 13 deletions

View File

@@ -1,5 +1,6 @@
import type { InputValue } from '@portabletext/svelte'; import type { InputValue } from '@portabletext/svelte';
export type EventPost = { export type EventPost = {
id: string; id: string;
name: string; name: string;
@@ -8,14 +9,16 @@ export type EventPost = {
time: string; time: string;
location: string; location: string;
thumbnail: string; thumbnail: string;
reglink: string;
category: string; category: string;
paylink: string; // event payment link (e.g., Zeffy) links: [{
title: string,
kind: string, // payment, registration, general (enum `kind`)
url: string
}],
}; };
export type Category = 'allEvents' | 'academic' | 'professional' | 'social' | 'technical'; export type Category = 'allEvents' | 'academic' | 'professional' | 'social' | 'technical';
export type FAQ = { export type FAQ = {
question: string; question: string;
answer: string; answer: string;

View File

@@ -7,8 +7,11 @@ const eventQuery = `*[_type == "events"]{
date, date,
location, location,
description, description,
reglink, "links": links[]{
paylink, "kind": kind,
"title": title,
"url": url
},
"thumbnail": thumbnail.asset->url+"?h=800&fm=webp", "thumbnail": thumbnail.asset->url+"?h=800&fm=webp",
"lastUpdated": _updatedAt, "lastUpdated": _updatedAt,
}`; }`;