Fix lint
This commit is contained in:
parent
6c9a3f977e
commit
23244e30b9
|
@ -66,8 +66,8 @@ interface IItem {
|
|||
const Item = ({ item, baseUrl, user, onPress }: IItem): JSX.Element => {
|
||||
const { theme } = useTheme();
|
||||
const username = item?.u?.username;
|
||||
let messageTime;
|
||||
let messageDate;
|
||||
let messageTime: string;
|
||||
let messageDate: string;
|
||||
|
||||
if (item?.ts) {
|
||||
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}>
|
||||
{username}
|
||||
</Text>
|
||||
<Text style={[styles.time, { color: themes[theme!].auxiliaryText }]}>{messageTime}</Text>
|
||||
<Text style={[styles.time, { color: themes[theme!].auxiliaryText }]}>{messageTime!}</Text>
|
||||
</View>
|
||||
<View style={styles.messageContainer}>
|
||||
{/* @ts-ignore */}
|
||||
|
@ -100,7 +100,7 @@ const Item = ({ item, baseUrl, user, onPress }: IItem): JSX.Element => {
|
|||
preview
|
||||
/>
|
||||
</View>
|
||||
<DiscussionDetails item={item} user={user} time={messageDate} style={styles.discussionDetails} />
|
||||
<DiscussionDetails item={item} user={user} time={messageDate!} style={styles.discussionDetails} />
|
||||
</View>
|
||||
</View>
|
||||
</Touchable>
|
||||
|
|
|
@ -130,7 +130,6 @@ const DiscussionsView = ({ navigation, route }: IDiscussionsViewProps): JSX.Elem
|
|||
<SearchHeader
|
||||
placeholder='Search Messages'
|
||||
onSearchChangeText={onSearchChangeText}
|
||||
theme={theme}
|
||||
testID='discussion-messages-view-search-header'
|
||||
/>
|
||||
),
|
||||
|
|
Loading…
Reference in New Issue