@@ -37,6 +37,7 @@ import { ConditionIcon } from '@/features/blocks/logic/condition/components/Cond
|
||||
import { RedirectIcon } from '@/features/blocks/logic/redirect/components/RedirectIcon'
|
||||
import { SetVariableIcon } from '@/features/blocks/logic/setVariable/components/SetVariableIcon'
|
||||
import { TypebotLinkIcon } from '@/features/blocks/logic/typebotLink/components/TypebotLinkIcon'
|
||||
import { AbTestIcon } from '@/features/blocks/logic/abTest/components/AbTestIcon'
|
||||
|
||||
type BlockIconProps = { type: BlockType } & IconProps
|
||||
|
||||
@@ -91,6 +92,8 @@ export const BlockIcon = ({ type, ...props }: BlockIconProps): JSX.Element => {
|
||||
return <JumpIcon color={purple} {...props} />
|
||||
case LogicBlockType.TYPEBOT_LINK:
|
||||
return <TypebotLinkIcon color={purple} {...props} />
|
||||
case LogicBlockType.AB_TEST:
|
||||
return <AbTestIcon color={purple} {...props} />
|
||||
case IntegrationBlockType.GOOGLE_SHEETS:
|
||||
return <GoogleSheetsLogo {...props} />
|
||||
case IntegrationBlockType.GOOGLE_ANALYTICS:
|
||||
|
||||
@@ -57,6 +57,8 @@ export const BlockLabel = ({ type }: Props): JSX.Element => {
|
||||
return <Text>Wait</Text>
|
||||
case LogicBlockType.JUMP:
|
||||
return <Text>Jump</Text>
|
||||
case LogicBlockType.AB_TEST:
|
||||
return <Text>AB Test</Text>
|
||||
case IntegrationBlockType.GOOGLE_SHEETS:
|
||||
return <Text>Sheets</Text>
|
||||
case IntegrationBlockType.GOOGLE_ANALYTICS:
|
||||
|
||||
@@ -7,6 +7,8 @@ import {
|
||||
Block,
|
||||
LogicBlockType,
|
||||
InputBlockType,
|
||||
ConditionItem,
|
||||
ButtonItem,
|
||||
} from '@typebot.io/schemas'
|
||||
import { SetTypebot } from '../TypebotProvider'
|
||||
import produce from 'immer'
|
||||
@@ -15,7 +17,11 @@ import { byId, blockHasItems } from '@typebot.io/lib'
|
||||
import { createId } from '@paralleldrive/cuid2'
|
||||
import { WritableDraft } from 'immer/dist/types/types-external'
|
||||
|
||||
type NewItem = Pick<Item, 'blockId' | 'outgoingEdgeId' | 'type'> & Partial<Item>
|
||||
type NewItem = Pick<
|
||||
ConditionItem | ButtonItem,
|
||||
'blockId' | 'outgoingEdgeId' | 'type'
|
||||
> &
|
||||
Partial<ConditionItem | ButtonItem>
|
||||
|
||||
export type ItemsActions = {
|
||||
createItem: (item: NewItem, indices: ItemIndices) => void
|
||||
|
||||
Reference in New Issue
Block a user