TP-85529 | Location Reference Id fix (#982)
This commit is contained in:
@@ -109,20 +109,6 @@ const AddressSelection: React.FC<IAddressSelection> = (props) => {
|
||||
};
|
||||
|
||||
if (isGeolocation) {
|
||||
if (isLoading) {
|
||||
return (
|
||||
<View style={GenericStyles.mt10}>
|
||||
{[...Array(7).keys()].map((_, index) => (
|
||||
<LineLoader
|
||||
key={index}
|
||||
width="100%"
|
||||
height={50}
|
||||
style={[GenericStyles.br8, GenericStyles.mb20]}
|
||||
/>
|
||||
))}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
if (!addresses?.length) {
|
||||
return (
|
||||
<View>
|
||||
@@ -137,41 +123,54 @@ const AddressSelection: React.FC<IAddressSelection> = (props) => {
|
||||
key={controllerName}
|
||||
control={control}
|
||||
rules={{ validate: (data) => validateInput(data, question.metadata.validators) }}
|
||||
render={({ field: { onChange, value } }) => (
|
||||
<View
|
||||
style={[
|
||||
GenericStyles.fill,
|
||||
GenericStyles.whiteBackground,
|
||||
GenericStyles.mt10,
|
||||
GenericStyles.br8,
|
||||
GenericStyles.pv24,
|
||||
]}
|
||||
>
|
||||
render={({ field: { onChange, value } }) =>
|
||||
isLoading ? (
|
||||
<View style={GenericStyles.mt10}>
|
||||
{[...Array(7).keys()].map((_, index) => (
|
||||
<LineLoader
|
||||
key={index}
|
||||
width="100%"
|
||||
height={50}
|
||||
style={[GenericStyles.br8, GenericStyles.mb20]}
|
||||
/>
|
||||
))}
|
||||
</View>
|
||||
) : (
|
||||
<View
|
||||
style={[
|
||||
GenericStyles.row,
|
||||
GenericStyles.centerAligned,
|
||||
GenericStyles.ph16,
|
||||
GenericStyles.mb12,
|
||||
GenericStyles.fill,
|
||||
GenericStyles.whiteBackground,
|
||||
GenericStyles.mt10,
|
||||
GenericStyles.br8,
|
||||
GenericStyles.pv24,
|
||||
]}
|
||||
>
|
||||
<NoLocationsIcon />
|
||||
<Text light style={GenericStyles.ml4}>
|
||||
No nearby geolocations found
|
||||
</Text>
|
||||
<View
|
||||
style={[
|
||||
GenericStyles.row,
|
||||
GenericStyles.centerAligned,
|
||||
GenericStyles.ph16,
|
||||
GenericStyles.mb12,
|
||||
]}
|
||||
>
|
||||
<NoLocationsIcon />
|
||||
<Text light style={GenericStyles.ml4}>
|
||||
No nearby geolocations found
|
||||
</Text>
|
||||
</View>
|
||||
<TouchableOpacity
|
||||
activeOpacity={0.7}
|
||||
onPress={reloadGeolocations}
|
||||
style={[GenericStyles.row, GenericStyles.centerAligned]}
|
||||
>
|
||||
<Text style={[GenericStyles.p12]}>
|
||||
<LoadingIcon fillColor={COLORS.BASE.BLUE} />
|
||||
</Text>
|
||||
<Text>Retry</Text>
|
||||
</TouchableOpacity>
|
||||
</View>
|
||||
<TouchableOpacity
|
||||
activeOpacity={0.7}
|
||||
onPress={reloadGeolocations}
|
||||
style={[GenericStyles.row, GenericStyles.centerAligned]}
|
||||
>
|
||||
<Text style={[GenericStyles.p12]}>
|
||||
<LoadingIcon fillColor={COLORS.BASE.BLUE} />
|
||||
</Text>
|
||||
<Text>Retry</Text>
|
||||
</TouchableOpacity>
|
||||
</View>
|
||||
)}
|
||||
)
|
||||
}
|
||||
name={controllerName}
|
||||
/>
|
||||
</View>
|
||||
|
||||
Reference in New Issue
Block a user