chore: exposed events data in the frontend#68
Conversation
…ed tanstack query
oorjagandhi
left a comment
There was a problem hiding this comment.
One small code change thanks!
| { | ||
| name: 'category', | ||
| type: 'select', | ||
| options: [ |
There was a problem hiding this comment.
Could you please change the categories to match Figma
joengy
left a comment
There was a problem hiding this comment.
Great work with the endpoints Dave, just a few heads up that you're likely to change some stuff when the events database schema gets updated based on Henry's testing as well as how we want to categories events e.g., food, cultural, social, etc etc
| } | ||
|
|
||
| export type EventCategory = | ||
| | 'social' |
There was a problem hiding this comment.
You might want to double check with how the frontend is showing different event types, e.g., the satay by the quad one was food + community.
| image: EventMedia | ||
| } | ||
|
|
||
| export interface Event { |
There was a problem hiding this comment.
Just note in the future we'll need to have an entry for a google form so users can sign up, the database schema would probably have to be updated too so you'll have to come back later to also update this.
What does this PR do?
Sets up the data layer for the events page. Opens public read access on the CMS
eventscollection, adds acategoryfield, installs TanStack Query, and ships three composable hooks (useEvents,useUpcomingEvents,usePastEvents) backed by a typed API client. All three hooks share one cache entry so the page makes a single network request. The events page itself is not wired up yet — this is the reusable foundation for that work.Type of change
Checklist
feature/,fix/,chore/,hotfix/)Linked Issues
Closes #40
Addresses #
Related to #