I am editing an app using TypeScript React and Meteor. Currently I got the following state:
{user && ( ... )}
This shows some data only if the visitor is a logged in user. I although want to show the data only if the tournament is not cancelled. So I tried to add
{user && !tournament.state === 'cancelled' && ( ... )}
which does not work. I receive the following linter message:
Operator '===' cannot be applied to types 'boolean' and '"cancelled"'.
How can I solve this puzzle?