UNPKG

@amityco/ts-sdk-react-native

Version:

Amity Social Cloud Typescript SDK

21 lines (19 loc) 663 B
import { createCommunityMemberEventSubscriber } from './utils'; /** * ```js * import { onCommunityLeft } from '@amityco/ts-sdk-react-native' * const dispose = onCommunityLeft((community, member) => { * // ... * }) * ``` * * Fired when a {@link Amity.Community} has been left * * @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 onCommunityLeft = ( callback: (community: Amity.InternalCommunity, member: Amity.Membership<'community'>[]) => void, ) => createCommunityMemberEventSubscriber('community.left', callback);