import { VOICE_USERS_SUBSCRIPTION, VoiceUsersResponse } from '../queries'; import createUseSubscription from '/imports/ui/core/hooks/createUseSubscription'; type Voice = VoiceUsersResponse['user_voice'][number]; const useVoiceUsersSubscription = createUseSubscription( VOICE_USERS_SUBSCRIPTION, {}, true, ); const useVoiceUsers = (projection: (v: Partial) => Partial) => { const response = useVoiceUsersSubscription(projection); return response; }; export default useVoiceUsers;