We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 53c13e6 commit 74abc13Copy full SHA for 74abc13
src/components/NewChatButton.js
@@ -1,11 +1,16 @@
1
import React from 'react';
2
import { useFlow } from 'react-chatbotify';
3
+import { useFormContext } from '../contexts/FormContext';
4
import RefreshIcon from './icons/RefreshIcon';
5
6
const NewChatButton = () => {
7
const { restartFlow } = useFlow();
8
+ const { resetTicketForm, resetFeedbackForm } = useFormContext();
9
10
const handleNewChat = () => {
11
+ // Clear all form state to ensure a clean start
12
+ resetTicketForm();
13
+ resetFeedbackForm();
14
restartFlow();
15
};
16
0 commit comments