Conversation Starters: - Updates to use the chatbot config for persistence.

This commit is contained in:
vinodkiran
2023-11-23 10:30:18 +05:30
parent 77a09929ab
commit a27da2375b
11 changed files with 16 additions and 54 deletions
@@ -210,8 +210,11 @@ export const ChatMessage = ({ open, chatflowid, isDialog }) => {
useEffect(() => {
if (getChatflowConfig.data) {
if (getChatflowConfig.data?.starterPrompt && JSON.parse(getChatflowConfig.data?.starterPrompt)) {
setStarterPrompts(JSON.parse(getChatflowConfig.data?.starterPrompt))
if (
getChatflowConfig.data?.chatbotConfig?.starterPrompts &&
JSON.parse(getChatflowConfig.data?.chatbotConfig?.starterPrompts)
) {
setStarterPrompts(JSON.parse(getChatflowConfig.data?.chatbotConfig?.starterPrompts))
}
}
// eslint-disable-next-line react-hooks/exhaustive-deps