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:
| Function | Method | Endpoint | Description |
|---|---|---|---|
getEvents(limit, sortBy, search) | GET | events | List events with optional search |
getEvent(eventSlug) | GET | events/{slug} | Get single event |
applyForEvent(eventSlug) | POST | events/applications/{slug} | Apply for an event |
redeemEventTicket(eventSlug) | POST | events/tickets/{slug} | Redeem event ticket |
redeemPromoCode(eventSlug, code) | POST | events/{slug}/promocode | Apply promo code |
rsvpToEvent(eventSlug, option) | POST | events/{slug}/rsvp | RSVP 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
| Hook | File | Description |
|---|---|---|
useRsvp | hooks/use-rsvp.ts | RSVP state and mutation |
useRedeemPromoCode | hooks/use-redeem-promo-code.ts | Promo code redemption |
Components
| Component | File | Description |
|---|---|---|
Events | components/events.tsx | Main events list |
EventCard | components/event-card.tsx | Event card |
EventModal | components/event-modal.tsx | Event detail modal |
EventDialog | components/event-dialog.tsx | Confirmation dialog |
EventModalButton | components/event-modal-button.tsx | CTA button in modal |
EventsHeader | components/events-header.tsx | Events section header |
EventTooltip | components/event-tooltip.tsx | Info tooltip |
PromoCodeModal | components/promo-code-modal.tsx | Promo code entry |
InfoModal | components/info-modal.tsx | Information modal |
SearchBar | components/search-bar.tsx | Event search |
GradientSection | components/gradient-section.tsx | Gradient background section |
BlurredView | components/blurred-view.tsx | Blurred content overlay |
DashedLine | components/dashed-line.tsx | Decorative dashed line |
EventsLogoIcon | components/icons/events-logo-icon.tsx | Events 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