Skip to content

Implement waitlist status function, hook, and access check for conditional routing #535

@roman20203

Description

@roman20203

Description

Implement waitlist status logic for conditional routing based on whether a user is in the waitlist. This includes backend logic, frontend hook, and access checks. We need to fetch the waitlist status (true or false) of a user from Firebase so it can be used as an accessCheck.

Back End Logic:

  • Add a Firebase callable function to check if a user is in the waitlist:
  • related collection will be named "waitlist-2025" (There is another ticket that is tasked with creating this collection in the Firebase Firestore)
  • Relevant file: functions/src/rsvp.ts
  • Deploy the function

Front End Hook:

  • Create a new hook to fetch the waitlist status of the current user
  • src/hooks/useWaitlist

AuthProvider hooks:

  • Extend the useUser hook to include the waitlist status

accessCheck:

  • Extend the context passed to access check functions to include waitlist status.

Checklist

Before submitting this ticket, make sure this ticket:

  • Is labelled properly - if this is a refactor, add the label!
  • Has the correct project assigned to it.
  • Has an assigned milestone.

And lastly:

  • Once someone picks up this ticket, make sure to assign it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    backendRelated to the backend of the projectenhancementNew feature or requestfrontendRelated to the frontend of the projectneeds-groomingThis ticket is incomplete and needs additional editing

    Projects

    Status

    No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions