2
0

Add dog insurance offer template

Closes #484
This commit is contained in:
Baptiste Arnaud
2023-05-04 15:32:13 -04:00
parent 55db360200
commit 8347e5b2a8
5 changed files with 832 additions and 3 deletions

View File

@@ -13,7 +13,7 @@ import {
duplicateBlockDraft,
WebhookCallBacks,
} from './blocks'
import { parseGroupTitle } from '@typebot.io/lib'
import { isEmpty, parseGroupTitle } from '@typebot.io/lib'
import { Coordinates } from '@/features/graph/types'
export type GroupsActions = {
@@ -75,7 +75,9 @@ const groupsActions = (
const id = createId()
const newGroup: Group = {
...group,
title: `${parseGroupTitle(group.title)} copy`,
title: isEmpty(group.title)
? ''
: `${parseGroupTitle(group.title)} copy`,
id,
blocks: group.blocks.map((block) =>
duplicateBlockDraft(id)(block, onWebhookBlockDuplicated)

View File

@@ -220,6 +220,7 @@ const NonMemoizedDraggableGroupNode = ({
shadow="md"
_hover={{ shadow: 'lg' }}
zIndex={isFocused ? 10 : 1}
spacing={isEmpty(group.title) ? '0' : '2'}
>
<Editable
value={groupTitle}

View File

@@ -38,7 +38,6 @@ export const templates: TemplateProps[] = [
emoji: '🧲',
fileName: 'lead-magnet.json',
category: 'marketing',
isNew: true,
description:
'Provide a free content to your prospects in exchange for their contact information.',
},
@@ -102,4 +101,13 @@ export const templates: TemplateProps[] = [
description:
'You are a marketing agency and this bot allows you generate new leads interested in your services. An AI block is used to dig deeper into the user needs.',
},
{
name: 'Insurance offer',
emoji: '🐶',
fileName: 'dog-insurance-offer.json',
category: 'marketing',
isNew: true,
description:
'You are a dog insurance company. This bot allows you to collect information about the dog and provide a quote.',
},
]