I want to call this function whenever enter is beign clicked , do i need to pass an event here. please help me thanks in advance

```
function handleSendMessage(socketId, mesg, clientMessage) {
  console.log("calling this metho", socketId, mesg);   
}

<WaitingRoom handleSendMessage={handleSendMessage} />

```

WaitingRoom component:-

```
  const WaitingRoom = ({waitRoom, handleSendMessage}) => {

   function handleMessage (socketId, msg) {
     console.log('chat open clicked', socketId, msg)
    handleSendMessage(socketId, msg)
  }

return (
<Grid item xs={12} lg={4} className={classes.root}>
  <Card className={classes.cardTop}>
    <h1>Room</h1>
  </Card>
  { [...new Set(waitRoom)].map((data) => 
    ( data.customerName.length >=  1)
      ? <WaitinRoomCardListItem
      handleMessage={handleMessage}
    ></WaitinRoomCardListItem>
    : null
  )}
  <Card className={classes.cardBottom}></Card>
</Grid>
 )
 }

 export default WaitingRoom

```