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