24 lines
548 B
JavaScript
24 lines
548 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
|
|
);
|