34 lines
786 B
JavaScript
34 lines
786 B
JavaScript
import { createSelector } from "reselect";
|
|
|
|
const selectMessaging = (state) => state.messaging;
|
|
|
|
export const selectChatVisible = createSelector(
|
|
[selectMessaging],
|
|
(messaging) => messaging.visible
|
|
);
|
|
|
|
export const selectIsSending = createSelector(
|
|
[selectMessaging],
|
|
(messaging) => messaging.isSending
|
|
);
|
|
|
|
export const selectError = createSelector(
|
|
[selectMessaging],
|
|
(messaging) => messaging.error
|
|
);
|
|
|
|
export const selectSelectedConversation = createSelector(
|
|
[selectMessaging],
|
|
(messaging) => messaging.selectedConversationId
|
|
);
|
|
|
|
export const selectMessage = createSelector(
|
|
[selectMessaging],
|
|
(messaging) => messaging.message
|
|
);
|
|
|
|
export const searchingForConversation = createSelector(
|
|
[selectMessaging],
|
|
(messaging) => messaging.searchingForConversation
|
|
);
|