📝 Add Savings Estimator template
This commit is contained in:
@@ -70,8 +70,7 @@ export const ButtonsItemNode = ({ item, indices, isMouseOver }: Props) => {
|
||||
}
|
||||
|
||||
const handleEditableChange = (val: string) => {
|
||||
if (val.length - itemValue.length && val.endsWith('\n')) return
|
||||
if (val.length - itemValue.length === 1) return setItemValue(val)
|
||||
if (itemValue !== '') return setItemValue(val)
|
||||
const values = convertStrToList(val)
|
||||
if (values.length === 1) {
|
||||
setItemValue(values[0])
|
||||
|
||||
@@ -32,7 +32,7 @@ import { trpc } from '@/lib/trpc'
|
||||
import { EventsActions, eventsActions } from './typebotActions/events'
|
||||
import { useGroupsStore } from '@/features/graph/hooks/useGroupsStore'
|
||||
|
||||
const autoSaveTimeout = 10000
|
||||
const autoSaveTimeout = 15000
|
||||
|
||||
type UpdateTypebotPayload = Partial<
|
||||
Pick<
|
||||
@@ -225,7 +225,12 @@ export const TypebotProvider = ({
|
||||
...localTypebot,
|
||||
...updates,
|
||||
}
|
||||
if (dequal(omit(typebot, 'updatedAt'), omit(typebotToSave, 'updatedAt')))
|
||||
if (
|
||||
dequal(
|
||||
JSON.parse(JSON.stringify(omit(typebot, 'updatedAt'))),
|
||||
JSON.parse(JSON.stringify(omit(typebotToSave, 'updatedAt')))
|
||||
)
|
||||
)
|
||||
return
|
||||
const newParsedTypebot = typebotV6Schema.parse({ ...typebotToSave })
|
||||
setLocalTypebot(newParsedTypebot)
|
||||
|
||||
@@ -154,5 +154,14 @@ export const useTemplates = (): TemplateProps[] => {
|
||||
fileName: 'openai-assistant-chat.json',
|
||||
description: 'A simple conversation with your OpenAI assistant.',
|
||||
},
|
||||
{
|
||||
name: 'Savings Estimator',
|
||||
emoji: '💰',
|
||||
fileName: 'savings-estimator.json',
|
||||
isNew: true,
|
||||
category: 'marketing',
|
||||
description:
|
||||
"This bot works for INGA, a commerce that sells reusable sponges and paper towels. It asks simple question to estimate the user's potential savings if he decides to buy INGA products.",
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user