Skip to main content

Overview

useFetchInvitees returns a callable that fetches the paginated invitee (guest) list for an event. Host-only — non-hosts receive 403. Each item is an EventInvite with the invited user populated.

Usage Example

import { useFetchInvitees } from "@sublay/react-js";

function useInvitees(eventId: string) {
  const fetchInvitees = useFetchInvitees();
  return () => fetchInvitees({ eventId, page: 1, limit: 20 });
}

Parameters

eventId
string
required
The event ID.
page
number
Page number (1-indexed). Defaults to 1.
limit
number
Results per page. Capped at 100.

Returns

Returns a Promise<PaginatedResponse<EventInvite>>{ data, pagination }.

See Also