File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66 useChatContext ,
77 ThreadContextValue ,
88 MessageList ,
9+ WithComponents ,
910} from 'stream-chat-expo' ;
1011import { Stack , useLocalSearchParams , useRouter } from 'expo-router' ;
1112import { AuthProgressLoader } from '../../../components/AuthProgressLoader' ;
@@ -70,22 +71,23 @@ export default function ChannelScreen() {
7071 < Stack . Screen
7172 options = { { title : 'Channel Screen' , contentStyle : { backgroundColor : 'white' } } }
7273 />
73- < Channel
74- audioRecordingEnabled = { true }
75- channel = { channel }
76- onPressMessage = { onPressMessage }
77- keyboardVerticalOffset = { headerHeight }
78- MessageLocation = { MessageLocation }
79- thread = { thread }
80- >
81- < MessageList
82- onThreadSelect = { ( thread : ThreadContextValue [ 'thread' ] ) => {
83- setThread ( thread ) ;
84- router . push ( `/channel/${ channel . cid } /thread/${ thread ?. cid ?? '' } ` ) ;
85- } }
86- />
87- < MessageComposer InputButtons = { InputButtons } />
88- </ Channel >
74+ < WithComponents value = { { MessageLocation, InputButtons } } >
75+ < Channel
76+ audioRecordingEnabled = { true }
77+ channel = { channel }
78+ onPressMessage = { onPressMessage }
79+ keyboardVerticalOffset = { headerHeight }
80+ thread = { thread }
81+ >
82+ < MessageList
83+ onThreadSelect = { ( thread : ThreadContextValue [ 'thread' ] ) => {
84+ setThread ( thread ) ;
85+ router . push ( `/channel/${ channel . cid } /thread/${ thread ?. cid ?? '' } ` ) ;
86+ } }
87+ />
88+ < MessageComposer />
89+ </ Channel >
90+ </ WithComponents >
8991 </ View >
9092 ) ;
9193}
Original file line number Diff line number Diff line change 11import React , { useState } from 'react' ;
22import { Pressable , StyleSheet } from 'react-native' ;
3- import { Channel , InputButtons as DefaultInputButtons } from 'stream-chat-expo' ;
3+ import type { ComponentOverrides } from 'stream-chat-expo' ;
4+ import { InputButtons as DefaultInputButtons } from 'stream-chat-expo' ;
45import { ShareLocationIcon } from '../icons/ShareLocationIcon' ;
56import { LiveLocationCreateModal } from './LocationSharing/CreateLocationModal' ;
67
7- const InputButtons : NonNullable < React . ComponentProps < typeof Channel > [ 'InputButtons' ] > = ( props ) => {
8+ const InputButtons : NonNullable < ComponentOverrides [ 'InputButtons' ] > = ( props ) => {
89 const [ modalVisible , setModalVisible ] = useState ( false ) ;
910
1011 const onRequestClose = ( ) => {
You can’t perform that action at this time.
0 commit comments