File tree Expand file tree Collapse file tree 1 file changed +5
-24
lines changed
packages/frontend/src/components/chat Expand file tree Collapse file tree 1 file changed +5
-24
lines changed Original file line number Diff line number Diff line change @@ -405,40 +405,21 @@ type ChatListItemProps = {
405
405
}
406
406
407
407
const ChatListItem = React . memo < ChatListItemProps > ( props => {
408
- const { chatListItem, onClick , roleTab , onFocus } = props
408
+ const { chatListItem } = props
409
409
410
410
// if not loaded by virtual list yet
411
411
if ( typeof chatListItem === 'undefined' ) return < PlaceholderChatListItem />
412
412
413
413
if ( chatListItem . kind == 'ChatListItem' ) {
414
- return (
415
- < ChatListItemNormal
416
- chatListItem = { chatListItem }
417
- onClick = { onClick }
418
- roleTab = { roleTab }
419
- onFocus = { onFocus }
420
- isSelected = { props . isSelected }
421
- onContextMenu = { props . onContextMenu }
422
- isContextMenuActive = { props . isContextMenuActive }
423
- />
424
- )
414
+ return < ChatListItemNormal { ...props } chatListItem = { chatListItem } />
425
415
} else if ( chatListItem . kind == 'Error' ) {
426
- return (
427
- < ChatListItemError
428
- chatListItem = { chatListItem }
429
- onClick = { onClick }
430
- roleTab = { roleTab }
431
- onFocus = { onFocus }
432
- isSelected = { props . isSelected }
433
- onContextMenu = { props . onContextMenu }
434
- />
435
- )
416
+ return < ChatListItemError { ...props } chatListItem = { chatListItem } />
436
417
} else if ( chatListItem . kind == 'ArchiveLink' ) {
437
418
return (
438
419
< ChatListItemArchiveLink
439
420
chatListItem = { chatListItem }
440
- onClick = { onClick }
441
- onFocus = { onFocus }
421
+ onClick = { props . onClick }
422
+ onFocus = { props . onFocus }
442
423
/>
443
424
)
444
425
} else {
You can’t perform that action at this time.
0 commit comments