Skip to main content

Overview

useRemoveInvite returns a callable that removes a user’s invite. Host-only. Removing the invite revokes access to an invite-only event and also deletes that user’s RSVP (decrementing the count). Removing a non-invited user is an idempotent no-op.

Usage Example

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

function UninviteButton({ eventId }: { eventId: string }) {
  const removeInvite = useRemoveInvite();
  return (
    <button onClick={() => removeInvite({ eventId, userId: "usr_guest" })}>
      Remove invite
    </button>
  );
}

Parameters

eventId
string
required
The event ID.
userId
string
required
The invitee to remove.

Returns

Returns a Promise<Event> — the updated Event with refreshed rsvpCounts.

See Also