Skip to Content
Housr AppFeaturesEvents Feature

Events Feature

Event discovery, RSVP, ticket redemption, and promo codes.

Location

  • Feature module: src/features/events/
  • Route: src/app/(tabs)/promotions/(tabs)/events.tsx

API Functions

Defined in src/features/events/api/index.ts:

FunctionMethodEndpointDescription
getEvents(limit, sortBy, search)GETeventsList events with optional search
getEvent(eventSlug)GETevents/{slug}Get single event
applyForEvent(eventSlug)POSTevents/applications/{slug}Apply for an event
redeemEventTicket(eventSlug)POSTevents/tickets/{slug}Redeem event ticket
redeemPromoCode(eventSlug, code)POSTevents/{slug}/promocodeApply promo code
rsvpToEvent(eventSlug, option)POSTevents/{slug}/rsvpRSVP yes/no

All use apiV2.

Types

type Event = { display_name: string; slug: string; category: string; company: string; description: string; banner_url: string; modal_image_url: string; access_type: string; is_active: boolean; is_featured: boolean; start_at: string; end_at: string; location: string; has_ticket: boolean; application_status: string; meet_exclusive_criteria: boolean; rsvp_option: 'yes' | 'no' | null; };

Hooks

HookFileDescription
useRsvphooks/use-rsvp.tsRSVP state and mutation
useRedeemPromoCodehooks/use-redeem-promo-code.tsPromo code redemption

Components

ComponentFileDescription
Eventscomponents/events.tsxMain events list
EventCardcomponents/event-card.tsxEvent card
EventModalcomponents/event-modal.tsxEvent detail modal
EventDialogcomponents/event-dialog.tsxConfirmation dialog
EventModalButtoncomponents/event-modal-button.tsxCTA button in modal
EventsHeadercomponents/events-header.tsxEvents section header
EventTooltipcomponents/event-tooltip.tsxInfo tooltip
PromoCodeModalcomponents/promo-code-modal.tsxPromo code entry
InfoModalcomponents/info-modal.tsxInformation modal
SearchBarcomponents/search-bar.tsxEvent search
GradientSectioncomponents/gradient-section.tsxGradient background section
BlurredViewcomponents/blurred-view.tsxBlurred content overlay
DashedLinecomponents/dashed-line.tsxDecorative dashed line
EventsLogoIconcomponents/icons/events-logo-icon.tsxEvents branding icon

Tracking

utils/tracking.ts provides analytics tracking for event interactions. Events are tracked via Mixpanel.

Access Types

Events can have different access types controlling who can see/attend them. The meet_exclusive_criteria flag indicates whether the current user qualifies for exclusive events.

Last updated on