import React from 'react'; import { useDispatch } from 'react-redux'; import { setConversation } from '~/store/convoSlice'; import { setMessages } from '~/store/messageSlice'; export default function NewChat() { const dispatch = useDispatch(); const clickHandler = () => { dispatch(setMessages([])); dispatch(setConversation({ conversationId: null, parentMessageId: null })); }; return ( New chat ); }