diff options
author | Ivan Chen <ivan@tagg.id> | 2021-04-09 16:40:06 -0400 |
---|---|---|
committer | Ivan Chen <ivan@tagg.id> | 2021-04-09 16:40:06 -0400 |
commit | cf558e378e238edd29f4fa135befce43a5880d36 (patch) | |
tree | dc825c02475f13b66a3668498481dda36de8c6ab /src/components/messages/ChannelPreview.tsx | |
parent | 3ec56863bfdd47b2ee8d0f0fe5a45be779508660 (diff) |
created initial styling
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; |