UNPKG

@amityco/ts-sdk

Version:

Amity Social Cloud Typescript SDK

21 lines (19 loc) 685 B
import { createCommunityMemberEventSubscriber } from './utils'; /** * ```js * import { onCommunityUserRemoved } from '@amityco/ts-sdk' * const dispose = onCommunityUserRemoved((community, member) => { * // ... * }) * ``` * * Fired when a user has been removed from a {@link Amity.Community} * * @param callback The function to call when the event was fired * @returns an {@link Amity.Unsubscriber} function to stop listening * * @category Community Events */ export const onCommunityUserRemoved = ( callback: (community: Amity.Community, member: Amity.Membership<'community'>[]) => void, ) => createCommunityMemberEventSubscriber('community.userRemoved', callback);