1- import { PropsWithChildren , createContext , useContext , useState } from 'react' ;
2- import { StreamChatGenerics } from '../types' ;
1+ import { PropsWithChildren , createContext , useState } from 'react' ;
32import { Channel as ChannelType } from 'stream-chat' ;
43import { ThreadContextValue } from 'stream-chat-expo' ;
54
65export type AppContextType = {
7- channel : ChannelType < StreamChatGenerics > | undefined ;
8- setChannel : React . Dispatch < React . SetStateAction < ChannelType < StreamChatGenerics > | undefined > > ;
6+ channel : ChannelType | undefined ;
7+ setChannel : React . Dispatch < React . SetStateAction < ChannelType | undefined > > ;
98 setThread : React . Dispatch <
10- React . SetStateAction < ThreadContextValue < StreamChatGenerics > [ 'thread' ] | undefined >
9+ React . SetStateAction < ThreadContextValue [ 'thread' ] | undefined >
1110 > ;
12- thread : ThreadContextValue < StreamChatGenerics > [ 'thread' ] | undefined ;
11+ thread : ThreadContextValue [ 'thread' ] | undefined ;
1312} ;
1413
1514export const AppContext = createContext < AppContextType > ( {
@@ -20,9 +19,9 @@ export const AppContext = createContext<AppContextType>({
2019} ) ;
2120
2221export const AppProvider = ( { children } : PropsWithChildren ) => {
23- const [ channel , setChannel ] = useState < ChannelType < StreamChatGenerics > | undefined > ( undefined ) ;
22+ const [ channel , setChannel ] = useState < ChannelType | undefined > ( undefined ) ;
2423 const [ thread , setThread ] = useState <
25- ThreadContextValue < StreamChatGenerics > [ 'thread' ] | undefined
24+ ThreadContextValue [ 'thread' ] | undefined
2625 > ( undefined ) ;
2726
2827 return (
0 commit comments