forked from GetStream/stream-chat-react
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathThreadHead.tsx
More file actions
23 lines (19 loc) · 699 Bytes
/
ThreadHead.tsx
File metadata and controls
23 lines (19 loc) · 699 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import React from 'react';
import { Message, MessageProps } from '../Message';
import { ThreadStart as DefaultThreadStart } from './ThreadStart';
import { useComponentContext } from '../../context';
import type { DefaultStreamChatGenerics } from '../../types/types';
export const ThreadHead = <
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
>(
props: MessageProps<StreamChatGenerics>,
) => {
const { ThreadStart = DefaultThreadStart } =
useComponentContext<StreamChatGenerics>('ThreadHead');
return (
<div className='str-chat__parent-message-li'>
<Message initialMessage threadList {...props} />
<ThreadStart />
</div>
);
};