Refactored Messaging as a part of BOD-14. Breaking changes remain.
This commit is contained in:
@@ -1,13 +1,23 @@
|
||||
import { createSelector } from "reselect";
|
||||
|
||||
const selectMessaging = state => state.messaging;
|
||||
const selectMessaging = (state) => state.messaging;
|
||||
|
||||
export const selectChatVisible = createSelector(
|
||||
[selectMessaging],
|
||||
messaging => messaging.visible
|
||||
(messaging) => messaging.visible
|
||||
);
|
||||
|
||||
export const selectConversations = createSelector(
|
||||
export const selectIsSending = createSelector(
|
||||
[selectMessaging],
|
||||
messaging => messaging.conversations
|
||||
(messaging) => messaging.isSending
|
||||
);
|
||||
|
||||
export const selectError = createSelector(
|
||||
[selectMessaging],
|
||||
(messaging) => messaging.error
|
||||
);
|
||||
|
||||
export const selectSelectedConversation = createSelector(
|
||||
[selectMessaging],
|
||||
(messaging) => messaging.selectedConversationId
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user