diff --git a/app/containers/ThreadDetails.tsx b/app/containers/ThreadDetails.tsx index 2edb451e8..92f2aa9c2 100644 --- a/app/containers/ThreadDetails.tsx +++ b/app/containers/ThreadDetails.tsx @@ -41,7 +41,7 @@ const styles = StyleSheet.create({ }); interface IThreadDetails { - item: Partial; + item: Pick; user: { id: string; }; @@ -62,21 +62,21 @@ const ThreadDetails = ({ item, user, badgeColor, toggleFollowThread, style }: IT replies = '+999'; } - const isFollowing = item.replies?.find((u: any) => u === user?.id); + const isFollowing = item.replies?.find((u: string) => u === user?.id); return ( - - + + {count} - - + + {replies} @@ -87,7 +87,7 @@ const ThreadDetails = ({ item, user, badgeColor, toggleFollowThread, style }: IT diff --git a/app/views/ThreadMessagesView/Item.tsx b/app/views/ThreadMessagesView/Item.tsx index b7453f011..82441c43e 100644 --- a/app/views/ThreadMessagesView/Item.tsx +++ b/app/views/ThreadMessagesView/Item.tsx @@ -70,7 +70,6 @@ const Item = ({ item, useRealName, user, badgeColor, onPress, toggleFollowThread const username = (useRealName && item?.u?.name) || item?.u?.username; let time; if (item?.ts) { - // @ts-ignore TODO: to be fixed after we unify our types time = formatDateThreads(item.ts); } @@ -78,15 +77,15 @@ const Item = ({ item, useRealName, user, badgeColor, onPress, toggleFollowThread onPress(item)} testID={`thread-messages-view-${item.msg}`} - style={{ backgroundColor: themes[theme!].backgroundColor }}> + style={{ backgroundColor: themes[theme].backgroundColor }}> - + {username} - {time} + {time}