File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed
Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change 1- import { useCallback } from 'react' ;
21import { ChannelFilters , ChannelOptions , ChannelSort } from 'stream-chat' ;
32import {
43 AIStateIndicator ,
@@ -9,11 +8,11 @@ import {
98 Chat ,
109 ChatView ,
1110 MessageInput ,
12- VirtualizedMessageList as MessageList ,
1311 StreamMessage ,
1412 Thread ,
1513 ThreadList ,
1614 useCreateChatClient ,
15+ VirtualizedMessageList as MessageList ,
1716 Window ,
1817} from 'stream-chat-react' ;
1918
@@ -65,18 +64,16 @@ type StreamChatGenerics = {
6564 userType : LocalUserType ;
6665} ;
6766
67+ const isMessageAIGenerated = ( message : StreamMessage < StreamChatGenerics > ) =>
68+ ! ! message ?. ai_generated ;
69+
6870const App = ( ) => {
6971 const chatClient = useCreateChatClient < StreamChatGenerics > ( {
7072 apiKey,
7173 tokenOrProvider : userToken ,
7274 userData : { id : userId } ,
7375 } ) ;
7476
75- const isMessageAIGenerated = useCallback (
76- ( message : StreamMessage < StreamChatGenerics > ) => ! ! message ?. ai_generated ,
77- [ ] ,
78- ) ;
79-
8077 if ( ! chatClient ) return < > Loading...</ > ;
8178
8279 return (
You can’t perform that action at this time.
0 commit comments