We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2695c67 commit 45576a2Copy full SHA for 45576a2
2 files changed
src/ChatItem/ChatItem.tsx
@@ -23,7 +23,7 @@ const ChatItem: React.FC<IChatItemProps> = ({
23
const [onDrag, setOnDrag] = useState(false)
24
25
useEffect(() => {
26
- props.setDragStates(setOnDrag)
+ props?.setDragStates(setOnDrag)
27
}, [])
28
29
const handleOnMouseEnter = () => {
src/ChatList/ChatList.tsx
@@ -25,9 +25,9 @@ const ChatList: React.FC<IChatListProps> = props => {
list.push(state)
}
- const onDragLeaveMW = (e: React.MouseEvent<HTMLElement>, id: Number | string) => {
+ const onDragLeaveMW = (e: React.MouseEvent<HTMLElement>, id: number | string) => {
if (list.length > 0) list.forEach(item => item(false))
30
- props.onDragLeave(e, id)
+ props?.onDragLeave(e, id)
31
32
33
return (
0 commit comments