Created
November 1, 2020 09:43
-
-
Save vishalnarkhede/d4b5020667e3f1722d728e9d8a64f7fa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// src/components/MessageSlack.js | |
import React from 'react'; | |
import {MessageSimple} from 'stream-chat-react-native'; | |
import {MessageFooter} from './MessageFooter'; | |
import {MessageText} from './MessageText'; | |
import {MessageAvatar} from './MessageAvatar'; | |
import {MessageHeader} from './MessageHeader'; | |
import {UrlPreview} from './UrlPreview'; | |
import {Giphy} from './Giphy'; | |
import {MessageActionSheet} from './MessageActionSheet'; | |
import ReactNativeHaptic from 'react-native-haptic'; | |
import {getSupportedReactions} from '../utils/supportedReactions'; | |
export const MessageSlack = props => { | |
if (props.message.deleted_at) { | |
return null; | |
} | |
return ( | |
<MessageSimple | |
{...props} | |
forceAlign="left" | |
ReactionList={null} | |
onLongPress={() => { | |
ReactNativeHaptic && ReactNativeHaptic.generate('impact'); | |
props.showActionSheet(); | |
}} | |
textBeforeAttachments | |
ActionSheet={MessageActionSheet} | |
MessageAvatar={MessageAvatar} | |
MessageHeader={MessageHeader} | |
MessageFooter={MessageFooter} | |
MessageText={MessageText} | |
UrlPreview={UrlPreview} | |
Giphy={Giphy} | |
supportedReactions={getSupportedReactions(false)} | |
/> | |
); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment