I am trying to put a conditional statement within a conditional statement (something i thought was simple) in my code.
What is want is if weekState
(boolean) is true, and bool
is true, show the first jsx element. If weekState
is true and bool
is false, show the second jsx element. If weekState
is false, return null
. Semms pretty simple, but im obviously missing something.
{ weekState ?
{ bool ?
<TableRow>
{take(weekListForAllAdvisorsOfState, 14)}
</TableRow>
:
<TableRow>
{take(weekListForAllAdvisorsOfState, 7)}
</TableRow>
}
: null
}
I have looked at this, and this which should have solved my issue, and makes me think theres a syntax error im not seeing.