I have declared 2 constant components in my React functional component.
I am trying to render them based on a condition,
<Flex.Box w="90px" ml={1}>
{ mycondition
? ({ staticButton })
: ((
{ staticButton })({ conditionalButton }))}
</Flex.Box>
I am trying to render based on if mycondition is true or false. But, I am getting the below error in the console.
TypeError: {(intermediate value)} is not a function
Am I doing anything wrong?