🐛 (editor) Don't show variable collection if not recognized
This commit is contained in:
@ -429,8 +429,7 @@
|
||||
"type": "choice input",
|
||||
"options": {
|
||||
"buttonLabel": "Send",
|
||||
"isMultipleChoice": false,
|
||||
"variableId": "vcl1sfd8v600432e6exab4vhov"
|
||||
"isMultipleChoice": false
|
||||
},
|
||||
"items": [
|
||||
{
|
||||
|
@ -226,13 +226,21 @@ const CollectVariableLabel = ({
|
||||
}: {
|
||||
variableId: string
|
||||
variables: Variable[]
|
||||
}) => (
|
||||
}) => {
|
||||
const textColor = useColorModeValue('gray.600', 'gray.400')
|
||||
const variableName = variables.find(
|
||||
(variable) => variable.id === variableId
|
||||
)?.name
|
||||
|
||||
if (!variableName) return null
|
||||
return (
|
||||
<HStack fontStyle="italic" spacing={1}>
|
||||
<Text fontSize="sm" color={useColorModeValue('gray.600', 'gray.400')}>
|
||||
<Text fontSize="sm" color={textColor}>
|
||||
Collects
|
||||
</Text>
|
||||
<Tag bg="orange.400" color="white" size="sm">
|
||||
{variables.find((variable) => variable.id === variableId)?.name}
|
||||
{variableName}
|
||||
</Tag>
|
||||
</HStack>
|
||||
)
|
||||
)
|
||||
}
|
||||
|
Reference in New Issue
Block a user