2
0

🚸 Improve zapier, make.com block content feedback

This commit is contained in:
Baptiste Arnaud
2024-04-15 08:32:25 +02:00
parent 4982400a4f
commit 75cd141138
3 changed files with 6 additions and 15 deletions

View File

@@ -1,19 +1,16 @@
import { Text } from '@chakra-ui/react' import { Text } from '@chakra-ui/react'
import { MakeComBlock } from '@typebot.io/schemas' import { MakeComBlock } from '@typebot.io/schemas'
import { isNotDefined } from '@typebot.io/lib'
type Props = { type Props = {
block: MakeComBlock block: MakeComBlock
} }
export const MakeComContent = ({ block }: Props) => { export const MakeComContent = ({ block }: Props) => {
const webhook = block.options?.webhook if (!block.options?.webhook?.url)
if (isNotDefined(webhook?.body))
return <Text color="gray.500">Configure...</Text> return <Text color="gray.500">Configure...</Text>
return ( return (
<Text noOfLines={1} pr="6"> <Text noOfLines={1} pr="6">
{webhook?.url ? 'Trigger scenario' : 'Disabled'} Trigger scenario
</Text> </Text>
) )
} }

View File

@@ -1,19 +1,16 @@
import { Text } from '@chakra-ui/react' import { Text } from '@chakra-ui/react'
import { PabblyConnectBlock } from '@typebot.io/schemas' import { PabblyConnectBlock } from '@typebot.io/schemas'
import { isNotDefined } from '@typebot.io/lib'
type Props = { type Props = {
block: PabblyConnectBlock block: PabblyConnectBlock
} }
export const PabblyConnectContent = ({ block }: Props) => { export const PabblyConnectContent = ({ block }: Props) => {
const webhook = block.options?.webhook if (!block.options?.webhook?.url)
if (isNotDefined(webhook?.body))
return <Text color="gray.500">Configure...</Text> return <Text color="gray.500">Configure...</Text>
return ( return (
<Text noOfLines={1} pr="6"> <Text noOfLines={1} pr="6">
{webhook?.url ? 'Trigger scenario' : 'Disabled'} Trigger scenario
</Text> </Text>
) )
} }

View File

@@ -1,19 +1,16 @@
import { Text } from '@chakra-ui/react' import { Text } from '@chakra-ui/react'
import { ZapierBlock } from '@typebot.io/schemas' import { ZapierBlock } from '@typebot.io/schemas'
import { isNotDefined } from '@typebot.io/lib'
type Props = { type Props = {
block: ZapierBlock block: ZapierBlock
} }
export const ZapierContent = ({ block }: Props) => { export const ZapierContent = ({ block }: Props) => {
const webhook = block.options?.webhook if (!block.options?.webhook?.url)
if (isNotDefined(webhook?.body))
return <Text color="gray.500">Configure...</Text> return <Text color="gray.500">Configure...</Text>
return ( return (
<Text noOfLines={1} pr="6"> <Text noOfLines={1} pr="6">
{webhook?.url ? 'Trigger zap' : 'Disabled'} Trigger zap
</Text> </Text>
) )
} }