This commit is contained in:
Gerzon Z 2022-01-17 16:19:48 -04:00
parent 6c9a3f977e
commit 23244e30b9
2 changed files with 4 additions and 5 deletions

View File

@ -66,8 +66,8 @@ interface IItem {
const Item = ({ item, baseUrl, user, onPress }: IItem): JSX.Element => { const Item = ({ item, baseUrl, user, onPress }: IItem): JSX.Element => {
const { theme } = useTheme(); const { theme } = useTheme();
const username = item?.u?.username; const username = item?.u?.username;
let messageTime; let messageTime: string;
let messageDate; let messageDate: string;
if (item?.ts) { if (item?.ts) {
messageTime = moment(item.ts).format('LT'); messageTime = moment(item.ts).format('LT');
@ -86,7 +86,7 @@ const Item = ({ item, baseUrl, user, onPress }: IItem): JSX.Element => {
<Text style={[styles.title, { color: themes[theme!].titleText }]} numberOfLines={1}> <Text style={[styles.title, { color: themes[theme!].titleText }]} numberOfLines={1}>
{username} {username}
</Text> </Text>
<Text style={[styles.time, { color: themes[theme!].auxiliaryText }]}>{messageTime}</Text> <Text style={[styles.time, { color: themes[theme!].auxiliaryText }]}>{messageTime!}</Text>
</View> </View>
<View style={styles.messageContainer}> <View style={styles.messageContainer}>
{/* @ts-ignore */} {/* @ts-ignore */}
@ -100,7 +100,7 @@ const Item = ({ item, baseUrl, user, onPress }: IItem): JSX.Element => {
preview preview
/> />
</View> </View>
<DiscussionDetails item={item} user={user} time={messageDate} style={styles.discussionDetails} /> <DiscussionDetails item={item} user={user} time={messageDate!} style={styles.discussionDetails} />
</View> </View>
</View> </View>
</Touchable> </Touchable>

View File

@ -130,7 +130,6 @@ const DiscussionsView = ({ navigation, route }: IDiscussionsViewProps): JSX.Elem
<SearchHeader <SearchHeader
placeholder='Search Messages' placeholder='Search Messages'
onSearchChangeText={onSearchChangeText} onSearchChangeText={onSearchChangeText}
theme={theme}
testID='discussion-messages-view-search-header' testID='discussion-messages-view-search-header'
/> />
), ),