diff --git a/native/components/thread-list-thread.react.js b/native/components/thread-list-thread.react.js --- a/native/components/thread-list-thread.react.js +++ b/native/components/thread-list-thread.react.js @@ -2,7 +2,8 @@ import * as React from 'react'; -import { type ThreadInfo } from 'lib/types/thread-types'; +import type { ThreadInfo, ResolvedThreadInfo } from 'lib/types/thread-types'; +import { useResolvedThreadInfo } from 'lib/utils/entity-helpers'; import { type Colors, useStyles, useColors } from '../themes/colors'; import type { ViewStyle, TextStyle } from '../types/styles'; @@ -10,14 +11,18 @@ import ColorSplotch from './color-splotch.react'; import { SingleLine } from './single-line.react'; -type BaseProps = { - +threadInfo: ThreadInfo, +type SharedProps = { +onSelect: (threadID: string) => void, +style?: ViewStyle, +textStyle?: TextStyle, }; +type BaseProps = { + ...SharedProps, + +threadInfo: ThreadInfo, +}; type Props = { - ...BaseProps, + ...SharedProps, + +threadInfo: ResolvedThreadInfo, +colors: Colors, +styles: typeof unboundStyles, }; @@ -62,10 +67,19 @@ const ConnectedThreadListThread: React.ComponentType = React.memo( function ConnectedThreadListThread(props: BaseProps) { + const { threadInfo, ...rest } = props; const styles = useStyles(unboundStyles); const colors = useColors(); + const resolvedThreadInfo = useResolvedThreadInfo(threadInfo); - return ; + return ( + + ); }, );