I have a box component
. I need to hide it if props
are false and show if one of them is true. But when props
are true, it is hidden. But when I switch to another component and return to those with boxes, it becomes visible.
<Box
component={Grid}
display={{
xs: error || activity ? "block" : "none",
sm: error || activity ? "block" : "none",
md: "block",
}}
>
<Component/>
</Box>