diff options
author | Ivan Chen <ivan@tagg.id> | 2021-04-09 21:36:34 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-09 21:36:34 -0400 |
commit | 506785887480e302b4052edbec4a8160785c0239 (patch) | |
tree | 3f9f40434212b2acfc21e8899ee0a5331ff41896 /src/components/messages/ChannelPreview.tsx | |
parent | 229e2957e7dd0084b5965048f0e015e710747eaf (diff) | |
parent | bd8d325d661b849673a6ea25a0113c1f3db4da49 (diff) |
Merge pull request #359 from IvanIFChen/tma784-style-message-input
[TMA-784] Style message input
Diffstat (limited to 'src/components/messages/ChannelPreview.tsx')
-rw-r--r-- | src/components/messages/ChannelPreview.tsx | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/src/components/messages/ChannelPreview.tsx b/src/components/messages/ChannelPreview.tsx index 312f879a..a7a7268a 100644 --- a/src/components/messages/ChannelPreview.tsx +++ b/src/components/messages/ChannelPreview.tsx @@ -3,7 +3,6 @@ import React, {useContext} from 'react'; import {Image, StyleSheet, Text, View} from 'react-native'; import {TouchableOpacity} from 'react-native-gesture-handler'; import {useStore} from 'react-redux'; -import {usernameRegex} from 'src/constants'; import {ChannelPreviewMessengerProps} from 'stream-chat-react-native'; import {ChatContext} from '../../App'; import { @@ -18,19 +17,21 @@ import { import {normalize, SCREEN_HEIGHT, SCREEN_WIDTH} from '../../utils'; import {getMember, isOnline} from '../../utils/messages'; -const ChannelPreview: React.FC<ChannelPreviewMessengerProps< - LocalAttachmentType, - LocalChannelType, - LocalCommandType, - LocalEventType, - LocalMessageType, - LocalReactionType, - LocalUserType ->> = (props) => { +const ChannelPreview: React.FC< + ChannelPreviewMessengerProps< + LocalAttachmentType, + LocalChannelType, + LocalCommandType, + LocalEventType, + LocalMessageType, + LocalReactionType, + LocalUserType + > +> = (props) => { + const {channel} = props; const {setChannel} = useContext(ChatContext); const state = useStore().getState(); const navigation = useNavigation(); - const {channel} = props; const member = getMember(channel, state); const online = isOnline(member?.user?.last_active); const unread = channel.state.unreadCount > 0; |