Skip to content

Commit

Permalink
secondary text style when name missing
Browse files Browse the repository at this point in the history
  • Loading branch information
esh-g committed Oct 23, 2023
1 parent 20020b2 commit 0731102
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/components/AddressSearch/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -394,8 +394,8 @@ function AddressSearch(props) {
const subtitle = data.isPredefinedPlace ? data.description : data.structured_formatting.secondary_text;
return (
<View>
<Text style={[styles.googleSearchText]}>{title || subtitle}</Text>
{title && subtitle && <Text style={[styles.textLabelSupporting]}>{subtitle}</Text>}
{title && <Text style={[styles.googleSearchText]}>{title}</Text>}
<Text style={[styles.textLabelSupporting]}>{subtitle}</Text>
</View>
);
}}
Expand Down
6 changes: 2 additions & 4 deletions src/components/DistanceEReceipt.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,16 +85,14 @@ function DistanceEReceipt({transaction}) {
} else {
descriptionKey += 'stop';
}
const title = waypoint.name || waypoint.address;
const subtitle = waypoint.name && waypoint.address ? waypoint.address : undefined;
return (
<View
style={styles.gap1}
key={key}
>
<Text style={styles.eReceiptWaypointTitle}>{translate(descriptionKey)}</Text>
<Text style={styles.eReceiptWaypointAddress}>{title}</Text>
{subtitle && <Text style={styles.textLabelSupporting}>{subtitle}</Text>}
{waypoint.name && <Text style={styles.eReceiptWaypointAddress}>{waypoint.name}</Text>}
{waypoint.address && <Text style={styles.textLabelSupporting}>{waypoint.address}</Text>}
</View>
);
})}
Expand Down
1 change: 0 additions & 1 deletion src/pages/iou/WaypointEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,6 @@ function WaypointEditor({route: {params: {iouType = '', transactionID = '', wayp
maxInputLength={CONST.FORM_CHARACTER_LIMIT}
renamedInputKeys={{
address: `waypoint${waypointIndex}`,
name: null,
city: null,
country: null,
street: null,
Expand Down

0 comments on commit 0731102

Please sign in to comment.