15 lines
761 B
TypeScript
15 lines
761 B
TypeScript
// Metro module 15886 (f15887).
|
|
import { useCallback } from "react";
|
|
import ChannelStore from "../../../../stores/ChannelStore";
|
|
import { AnalyticsPages, InstantInviteSources } from "../../../../Constants";
|
|
import { navigateToNewGroupDM } from "../../../main_tabs_v2/helpers/NavigationRouteUtils.native";
|
|
import { showInstantInviteActionSheet } from "../../../instant_invite/native/InstantInviteUtils";
|
|
export function useInviteMembersCallback(a0) {
|
|
return useCallback(() => {
|
|
const channel = ChannelStore.getChannel(a0);
|
|
return channel != null ? channel.isPrivate() ? navigateToNewGroupDM(channel.id, AnalyticsPages.CHANNEL_CALL) : showInstantInviteActionSheet(channel, {
|
|
source: InstantInviteSources.VOICE_CHANNEL
|
|
}) : null;
|
|
}, [a0]);
|
|
}
|