Skip to content

Commit

Permalink
🚸 (condition) Show "AND" label when default unchanged
Browse files Browse the repository at this point in the history
  • Loading branch information
baptisteArno committed Aug 19, 2024
1 parent c2c2ef7 commit 2275c69
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ import { Stack, Wrap, Tag, Text, useColorModeValue } from '@chakra-ui/react'
import { useTranslate } from '@tolgee/react'
import { byId } from '@typebot.io/lib'
import { Condition, Variable } from '@typebot.io/schemas'
import { ComparisonOperators } from '@typebot.io/schemas/features/blocks/logic/condition/constants'
import {
ComparisonOperators,
defaultConditionItemContent,
} from '@typebot.io/schemas/features/blocks/logic/condition/constants'

type Props = {
condition: Condition | undefined
Expand Down Expand Up @@ -30,7 +33,10 @@ export const ConditionContent = ({
</Text>
)}
{idx > 0 && (
<Text fontSize={size}>{condition.logicalOperator ?? ''}</Text>
<Text fontSize={size}>
{condition.logicalOperator ??
defaultConditionItemContent.logicalOperator}
</Text>
)}
{variable?.name && (
<Tag bgColor="orange.400" color="white" size="sm">
Expand Down

0 comments on commit 2275c69

Please sign in to comment.