@@ -10,11 +10,9 @@ import ReactionUpVote from '../../assets/icons/ReactionUpVote';
1010import { getColor } from '../../assets/data' ;
1111
1212import { TimestampContextValue , useMessageTimestamp } from "../../context/MessageTimestampController" ;
13+ import type { LocalMessage } from "stream-chat" ;
1314
14- import type { StreamMessage } from 'stream-chat-react/dist/context/ChannelStateContext' ;
15- import type { StreamChatType } from '../../types' ;
16-
17- const getTimeStamp = ( messageCreatedAt ?: StreamMessage < StreamChatType > [ 'created_at' ] ) => {
15+ const getTimeStamp = ( messageCreatedAt ?: LocalMessage [ 'created_at' ] ) => {
1816 if ( ! messageCreatedAt ) return '' ;
1917
2018 const createdAt = new Date ( messageCreatedAt ) ;
@@ -91,10 +89,10 @@ const MessageActions = ({downVote, upVote, onOpenThread}: MessageActionsProps) =
9189
9290type ReactionListProps = VotingStatsProps
9391 & Pick < MessageActionsProps , 'onOpenThread' >
94- & Pick < StreamMessage < StreamChatType > , 'reply_count' > ;
92+ & Pick < LocalMessage , 'reply_count' > ;
9593
9694const ReactionList = ( { upVotes, downVotes, onOpenThread} : ReactionListProps ) => {
97- const { message} = useMessageContext < StreamChatType > ( ) ;
95+ const { message} = useMessageContext ( ) ;
9896 return (
9997 < div className = 'custom-message__reaction-list' >
10098 < VotingStats upVotes = { upVotes } downVotes = { downVotes } />
@@ -108,7 +106,7 @@ const ReactionList = ({upVotes, downVotes, onOpenThread}: ReactionListProps) =>
108106}
109107
110108type MessageContentProps = { color ?: string }
111- & Pick < MessageContextValue < StreamChatType > , 'message' | 'handleAction' >
109+ & Pick < MessageContextValue , 'message' | 'handleAction' >
112110 & Pick < TimestampContextValue , 'timestampEnabled' > ;
113111
114112const MessageContent = ( { color, message, handleAction, timestampEnabled} : MessageContentProps ) => {
@@ -132,8 +130,8 @@ const MessageContent = ({color, message, handleAction, timestampEnabled}: Messag
132130}
133131
134132export const GamingMessage = ( ) => {
135- const { openThread} = useChannelActionContext < StreamChatType > ( ) ;
136- const { handleAction, message} = useMessageContext < StreamChatType > ( ) ;
133+ const { openThread} = useChannelActionContext ( ) ;
134+ const { handleAction, message} = useMessageContext ( ) ;
137135 const { timestampEnabled} = useMessageTimestamp ( ) ;
138136 const [ downVotes , setDownVotes ] = useState ( 0 ) ;
139137 const [ upVotes , setUpVotes ] = useState ( 0 ) ;
0 commit comments