Currently, I am working on an app using TypeScript React and Meteor. The state that I have at the moment is:
{user && ( ... )}
This code only displays certain data if the user is logged in. However, I want to display this data only if the tournament is not cancelled. Therefore, I attempted to modify it by adding:
{user && !tournament.state === 'cancelled' && ( ... )}
Unfortunately, this change did not work as expected. I received a linter message stating:
Operator '===' cannot be applied to types 'boolean' and '"cancelled"'.
How can I resolve this issue?