|
6 | 6 | MessageInput as DefaultMessageInput, |
7 | 7 | MessageInputProps, |
8 | 8 | } from '../MessageInput/MessageInput'; |
9 | | -import { useChannelContext } from '../../contexts/channelContext/ChannelContext'; |
10 | 9 | import { ChatContextValue, useChatContext } from '../../contexts/chatContext/ChatContext'; |
11 | 10 | import { |
12 | 11 | MessagesContextValue, |
@@ -164,17 +163,10 @@ export const Thread = < |
164 | 163 | props: ThreadProps<At, Ch, Co, Ev, Me, Re, Us>, |
165 | 164 | ) => { |
166 | 165 | const { client } = useChatContext<At, Ch, Co, Ev, Me, Re, Us>(); |
167 | | - const { threadList } = useChannelContext<At, Ch, Co, Ev, Me, Re, Us>(); |
168 | 166 | const { MessageList } = useMessagesContext<At, Ch, Co, Ev, Me, Re, Us>(); |
169 | 167 | const { closeThread, loadMoreThread, reloadThread, thread } = |
170 | 168 | useThreadContext<At, Ch, Co, Ev, Me, Re, Us>(); |
171 | 169 |
|
172 | | - if (thread?.id && !threadList) { |
173 | | - throw new Error( |
174 | | - 'Please add a threadList prop to your Channel component when rendering a thread list. Check our Channel documentation for more info: https://getstream.io/chat/docs/sdk/reactnative/core-components/channel/#threadlist', |
175 | | - ); |
176 | | - } |
177 | | - |
178 | 170 | return ( |
179 | 171 | <ThreadWithContext<At, Ch, Co, Ev, Me, Re, Us> |
180 | 172 | {...{ |
|
0 commit comments