Need some guidance on ternary operators in react js.
If dataCheck is true, my icon FaSitemap will appear. If it is false, the icon does not appear
However, if it returns an empty response, how do i ensure that the icon does not appear as well? Currently it will appear even if the response is empty even though i return null at the end.
{
(dataCheck) ? (
<span>
<FaSitemap
size="2.5em"
color="#1E88E5"
cursor="pointer"
/>
</span>
) : (null)
}