@@ -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)
|
||||
|
||||
@@ -220,6 +220,7 @@ const NonMemoizedDraggableGroupNode = ({
|
||||
shadow="md"
|
||||
_hover={{ shadow: 'lg' }}
|
||||
zIndex={isFocused ? 10 : 1}
|
||||
spacing={isEmpty(group.title) ? '0' : '2'}
|
||||
>
|
||||
<Editable
|
||||
value={groupTitle}
|
||||
|
||||
@@ -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.',
|
||||
},
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user