import React from 'react'; import { useDispatch } from 'react-redux'; import { setNewConvo } from '~/store/convoSlice'; import { setMessages } from '~/store/messageSlice'; import { setSubmission } from '~/store/submitSlice'; import { setText } from '~/store/textSlice'; export default function NewChat() { const dispatch = useDispatch(); const clickHandler = () => { dispatch(setText('')); dispatch(setMessages([])); dispatch(setNewConvo()); dispatch(setSubmission({})); }; return ( New chat ); }