NTP-67246 | Pulkit | Address validation api (#1186)
This commit is contained in:
@@ -112,6 +112,7 @@ const AddressItemHeader = (props: ITopAddressItemHeader) => {
|
||||
latitude={locationDetails?.latitude}
|
||||
longitude={locationDetails?.longitude}
|
||||
addressString={locationDetails?.addressText}
|
||||
isGeoCoordinatesReliable={locationDetails?.isGeoCoordinatesReliable}
|
||||
/>
|
||||
</Tooltip>
|
||||
</View>
|
||||
|
||||
@@ -9,9 +9,10 @@ import { GenericStyles, getShadowStyle } from '@rn-ui-lib/styles';
|
||||
import { getGoogleMapUrl, getGoogleMapUrlForAddressText } from '@components/utlis/commonFunctions';
|
||||
import { addClickstreamEvent } from '@services/clickstreamEventService';
|
||||
import { CLICKSTREAM_EVENT_NAMES } from '@common/Constants';
|
||||
import Tag, { TagVariant } from '@rn-ui-lib/components/Tag';
|
||||
|
||||
const OpenMapOptionsPopUp = (props: IOpenMapOptionsPopUpProps) => {
|
||||
const { latitude, longitude, addressString } = props;
|
||||
const { latitude, longitude, addressString, isGeoCoordinatesReliable } = props;
|
||||
|
||||
const handleSearchByGeolocation = () => {
|
||||
const mapUrl = getGoogleMapUrl(latitude, longitude);
|
||||
@@ -38,6 +39,9 @@ const OpenMapOptionsPopUp = (props: IOpenMapOptionsPopUpProps) => {
|
||||
<Text style={styles.buttonColor}>{`Open location (${latitude?.toFixed(
|
||||
3
|
||||
)}, ${longitude?.toFixed(3)})`}</Text>
|
||||
{isGeoCoordinatesReliable && (
|
||||
<Tag text="Recommended" variant={TagVariant.success} style={styles.tagStyle} />
|
||||
)}
|
||||
</TouchableOpacity>
|
||||
<View style={styles.line} />
|
||||
<TouchableOpacity
|
||||
@@ -74,6 +78,10 @@ const styles = StyleSheet.create({
|
||||
marginBottom: 6,
|
||||
},
|
||||
buttonColor: { color: COLORS.TEXT.BLUE },
|
||||
tagStyle: {
|
||||
marginLeft: 8,
|
||||
marginTop: 2,
|
||||
},
|
||||
});
|
||||
|
||||
export default OpenMapOptionsPopUp;
|
||||
|
||||
@@ -2,4 +2,5 @@ export interface IOpenMapOptionsPopUpProps {
|
||||
latitude: number;
|
||||
longitude: number;
|
||||
addressString: string;
|
||||
isGeoCoordinatesReliable?: boolean;
|
||||
}
|
||||
|
||||
@@ -35,6 +35,7 @@ export interface ILocationData {
|
||||
relatedLocationIds: string[];
|
||||
latestFeedback: ILatestFeedback;
|
||||
locationSubType: string;
|
||||
isGeoCoordinatesReliable: boolean;
|
||||
}
|
||||
|
||||
export interface ILocationDetails {
|
||||
|
||||
Reference in New Issue
Block a user