Skip to content

Commit 45576a2

Browse files
author
Emre Güdür
committed
fix ts err
1 parent 2695c67 commit 45576a2

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/ChatItem/ChatItem.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const ChatItem: React.FC<IChatItemProps> = ({
2323
const [onDrag, setOnDrag] = useState(false)
2424

2525
useEffect(() => {
26-
props.setDragStates(setOnDrag)
26+
props?.setDragStates(setOnDrag)
2727
}, [])
2828

2929
const handleOnMouseEnter = () => {

src/ChatList/ChatList.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ const ChatList: React.FC<IChatListProps> = props => {
2525
list.push(state)
2626
}
2727

28-
const onDragLeaveMW = (e: React.MouseEvent<HTMLElement>, id: Number | string) => {
28+
const onDragLeaveMW = (e: React.MouseEvent<HTMLElement>, id: number | string) => {
2929
if (list.length > 0) list.forEach(item => item(false))
30-
props.onDragLeave(e, id)
30+
props?.onDragLeave(e, id)
3131
}
3232

3333
return (

0 commit comments

Comments
 (0)