24 lines
1.4 KiB
TypeScript
24 lines
1.4 KiB
TypeScript
// Metro module 9461 (f9462).
|
|
import ConversationsStore from "../../conversations/ConversationsStore";
|
|
import MessagePreviewStore from "../../../stores/native/MessagePreviewStore";
|
|
import { useStateFromStores } from "../../../_bundle/Module589";
|
|
import useAnalyticsLocations, { AnalyticsLocationProvider } from "../../app_analytics/useAnalyticsLocations";
|
|
import AnalyticsLocation from "../../app_analytics/AnalyticsLocation";
|
|
import { MessageReactionsContent, MessageReactionsEmpty } from "./MessageReactionsContent";
|
|
let c6240_6 = [];
|
|
export default function MessagePreviewReactions(props) {
|
|
const { channelId: channelId2, messageId: messageId2, emoji } = props;
|
|
const channelId = channelId2;
|
|
const messageId = messageId2;
|
|
const stateFromStores = useStateFromStores([MessagePreviewStore, ConversationsStore], () => {
|
|
let r7 = MessagePreviewStore.getMessage(messageId);
|
|
if (r7 == null) {
|
|
r7 = ConversationsStore.getMessage(channelId, messageId);
|
|
}
|
|
return r7 != null ? r7.reactions : c6240_6;
|
|
}, [channelId, messageId]);
|
|
return <AnalyticsLocationProvider value={useAnalyticsLocations(AnalyticsLocation.MESSAGE_PREVIEW_REACTIONS).analyticsLocations}>
|
|
{stateFromStores.length > 0 ? <MessageReactionsContent channelId={channelId} messageId={messageId} emoji={emoji} reactions={stateFromStores} /> : <MessageReactionsEmpty />}
|
|
</AnalyticsLocationProvider>;
|
|
};
|