@@ -30,13 +30,13 @@ import type {
3030import type { Attachment } from 'stream-chat' ;
3131
3232export type AttachmentContainerProps <
33- StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics
33+ StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics ,
3434> = {
3535 attachment : Attachment < StreamChatGenerics > | GalleryAttachment < StreamChatGenerics > ;
3636 componentType : AttachmentComponentType ;
3737} ;
3838export const AttachmentWithinContainer = <
39- StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics
39+ StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics ,
4040> ( {
4141 attachment,
4242 children,
@@ -50,16 +50,17 @@ export const AttachmentWithinContainer = <
5050 componentType === 'card' && ! attachment ?. image_url && ! attachment ?. thumb_url
5151 ? 'no-image'
5252 : attachment ?. actions ?. length
53- ? 'actions'
54- : '' ;
53+ ? 'actions'
54+ : '' ;
5555 }
5656
5757 const classNames = clsx (
5858 'str-chat__message-attachment str-chat__message-attachment-dynamic-size' ,
5959 {
6060 [ `str-chat__message-attachment--${ componentType } ` ] : componentType ,
6161 [ `str-chat__message-attachment--${ attachment ?. type } ` ] : attachment ?. type ,
62- [ `str-chat__message-attachment--${ componentType } --${ extra } ` ] : componentType && extra ,
62+ [ `str-chat__message-attachment--${ componentType } --${ extra } ` ] :
63+ componentType && extra ,
6364 'str-chat__message-attachment--svg-image' : isSvgAttachment ( attachment ) ,
6465 'str-chat__message-attachment-with-actions' : extra === 'actions' ,
6566 } ,
@@ -69,7 +70,7 @@ export const AttachmentWithinContainer = <
6970} ;
7071
7172export const AttachmentActionsContainer = <
72- StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics
73+ StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics ,
7374> ( {
7475 actionHandler,
7576 attachment,
@@ -108,7 +109,7 @@ function getCssDimensionsVariables(url: string) {
108109}
109110
110111export const GalleryContainer = <
111- StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics
112+ StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics ,
112113> ( {
113114 attachment,
114115 Gallery = DefaultGallery ,
@@ -150,7 +151,7 @@ export const GalleryContainer = <
150151} ;
151152
152153export const ImageContainer = <
153- StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics
154+ StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics ,
154155> (
155156 props : RenderAttachmentProps < StreamChatGenerics > ,
156157) => {
@@ -194,7 +195,7 @@ export const ImageContainer = <
194195} ;
195196
196197export const CardContainer = <
197- StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics
198+ StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics ,
198199> (
199200 props : RenderAttachmentProps < StreamChatGenerics > ,
200201) => {
@@ -220,7 +221,7 @@ export const CardContainer = <
220221} ;
221222
222223export const FileContainer = <
223- StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics
224+ StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics ,
224225> ( {
225226 attachment,
226227 File = DefaultFile ,
@@ -234,7 +235,7 @@ export const FileContainer = <
234235 ) ;
235236} ;
236237export const AudioContainer = <
237- StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics
238+ StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics ,
238239> ( {
239240 attachment,
240241 Audio = DefaultAudio ,
@@ -247,11 +248,11 @@ export const AudioContainer = <
247248) ;
248249
249250export const VoiceRecordingContainer = <
250- StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics
251+ StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics ,
251252> ( {
252253 attachment,
253- VoiceRecording = DefaultVoiceRecording ,
254254 isQuoted,
255+ VoiceRecording = DefaultVoiceRecording ,
255256} : RenderAttachmentProps < StreamChatGenerics > ) => (
256257 < AttachmentWithinContainer attachment = { attachment } componentType = 'voiceRecording' >
257258 < div className = 'str-chat__attachment' >
@@ -261,18 +262,17 @@ export const VoiceRecordingContainer = <
261262) ;
262263
263264export const MediaContainer = <
264- StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics
265+ StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics ,
265266> (
266267 props : RenderAttachmentProps < StreamChatGenerics > ,
267268) => {
268269 const { attachment, Media = ReactPlayer } = props ;
269270 const componentType = 'media' ;
270- const { shouldGenerateVideoThumbnail, videoAttachmentSizeHandler } = useChannelStateContext ( ) ;
271+ const { shouldGenerateVideoThumbnail, videoAttachmentSizeHandler } =
272+ useChannelStateContext ( ) ;
271273 const videoElement = useRef < HTMLDivElement > ( null ) ;
272- const [
273- attachmentConfiguration ,
274- setAttachmentConfiguration ,
275- ] = useState < VideoAttachmentConfiguration > ( ) ;
274+ const [ attachmentConfiguration , setAttachmentConfiguration ] =
275+ useState < VideoAttachmentConfiguration > ( ) ;
276276
277277 useLayoutEffect ( ( ) => {
278278 if ( videoElement . current && videoAttachmentSizeHandler ) {
@@ -319,7 +319,7 @@ export const MediaContainer = <
319319} ;
320320
321321export const UnsupportedAttachmentContainer = <
322- StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics
322+ StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics ,
323323> ( {
324324 attachment,
325325 UnsupportedAttachment = DefaultUnsupportedAttachment ,
0 commit comments