Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes #311 #315

Open
wants to merge 9 commits into
base: react-native-app-prototype
Choose a base branch
from

Conversation

aleksandr-wemakesoftware
Copy link
Contributor

No description provided.

<View style={{ marginTop: 15 }}>
<Text style={styles.infoTitle}>{title.toUpperCase()}</Text>
<TouchableOpacity style={styles.infoTextWrapper} onPress={onPress}>
{icon && <Image source={icon} style={styles.image} resizeMode="contain"/>}
<Text style={styles.text}>{text}</Text>
{arrow && <Image source={arrow} style={styles.arrow} resizeMode="contain"/>}
{!!(counter || counter === 0) &&
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can counter be non-numeric or why is this check needed?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Zero value will be treated as falsy and React will try to render it outside of Text tag, which will cause an error.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, but the check allows any truthy value or zero, only excluding null and undefined. If those values are not possible, the whole check is redundant.

}

render() {
const { teams, loading } = this.props;
const { teams, loading, isAuthenticated, isGuestSession } = this.props;
if (!isAuthenticated && isGuestSession) return this.renderGuestTeams();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, add PropTypes for teams, loading, isAuthenticated, isGuestSession

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants