Skip to content

Commit

Permalink
fix(lint): explicit boolean expressions
Browse files Browse the repository at this point in the history
  • Loading branch information
shottah committed Jun 17, 2024
1 parent ae1951b commit 95d94b2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/kolektivo/vendors/VendorDetailBottomSheet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ function VendorDetailBottomSheet({ vendor, dismiss, select }: Props) {
</View>
{/* @todo Add Send button */}
<View style={styles.actionButtons}>
{address && (
{!!address && (
<Button
type={BtnTypes.PRIMARY}
size={BtnSizes.MEDIUM}
Expand Down
17 changes: 10 additions & 7 deletions src/kolektivo/vendors/VendorDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@ const VendorDetails = ({ vendor, close, action }: Props) => {
<Text style={styles.subtitle}>{subtitle}</Text>
<Text style={styles.description}>{description}</Text>
<View style={[styles.cico, acceptsGuilder && providesGuilder ? styles.cicoPartner : null]}>
{acceptsGuilder && (
{!!acceptsGuilder && (
<View style={styles.verifiedRow}>
<VerifiedIcon />
<Text style={styles.verified}>{t('acceptsGuilder')}</Text>
</View>
)}
{providesGuilder && (
{!!providesGuilder && (
<View style={styles.verifiedRow}>
<VerifiedIcon />
<Text style={styles.verified}>{t('providesGuilder')}</Text>
Expand All @@ -74,23 +74,26 @@ const VendorDetails = ({ vendor, close, action }: Props) => {
</View>

<View style={styles.contactRow}>
{phoneNumber && (
{!!phoneNumber && (
<TouchableOpacity
// @ts-ignore @todo
onPress={void 0}
>
<Phone />
</TouchableOpacity>
)}
{(((location as any).latitude !== 0 && (location as any).longitude !== 0) || street) && (
{!!(
((location as any).latitude !== 0 && (location as any).longitude !== 0) ||
street
) && (
<TouchableOpacity
// @ts-ignore @todo
onPress={void 0}
>
<Directions />
</TouchableOpacity>
)}
{siteURI && (
{!!siteURI && (
<TouchableOpacity onPress={() => navigateToURI(siteURI)}>
<Website />
</TouchableOpacity>
Expand All @@ -106,7 +109,7 @@ const VendorDetails = ({ vendor, close, action }: Props) => {
</View>
<View style={styles.actionButtons}></View>
<View style={styles.furtherDetailsRow}>
{street && (
{!!street && (
<View style={styles.streetContainer}>
<Pin />
<Text style={styles.street}>{`${street} ${building_number}${
Expand All @@ -127,7 +130,7 @@ const VendorDetails = ({ vendor, close, action }: Props) => {
))}
</View>
<View style={styles.actionButtons}>
{account && (
{!!account && (
<Button
type={BtnTypes.PRIMARY}
size={BtnSizes.MEDIUM}
Expand Down

0 comments on commit 95d94b2

Please sign in to comment.