Skip to content

chore: exposed events data in the frontend#68

Open
deb-coder-man wants to merge 1 commit into
mainfrom
chore/events-api-client
Open

chore: exposed events data in the frontend#68
deb-coder-man wants to merge 1 commit into
mainfrom
chore/events-api-client

Conversation

@deb-coder-man
Copy link
Copy Markdown
Contributor

What does this PR do?

Sets up the data layer for the events page. Opens public read access on the CMS events collection, adds a category field, 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

  • Feature
  • Bug fix
  • Chore / config
  • Hotfix

Checklist

  • My branch follows the naming convention (feature/, fix/, chore/, hotfix/)
  • My commit messages follow the conventional commits format
  • CI checks pass

Linked Issues

Closes #40
Addresses #
Related to #

@deb-coder-man deb-coder-man changed the title chore: created an api client, library client, events hook and install… chore: exposed events data in the frontend May 12, 2026
Copy link
Copy Markdown
Collaborator

@oorjagandhi oorjagandhi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One small code change thanks!

{
name: 'category',
type: 'select',
options: [
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please change the categories to match Figma

Copy link
Copy Markdown
Collaborator

@joengy joengy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread web/src/types/events.ts
}

export type EventCategory =
| 'social'
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread web/src/types/events.ts
image: EventMedia
}

export interface Event {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

EVENT-12 - Expose CMS API Endpoint

3 participants