enh
This commit is contained in:
parent
b54bf65bca
commit
b0e84b7089
4 changed files with 20 additions and 5 deletions
|
|
@ -32,4 +32,6 @@ DELIVERY_CHARGE=20
|
||||||
|
|
||||||
# Telegram Configuration
|
# Telegram Configuration
|
||||||
TELEGRAM_BOT_TOKEN=8410461852:AAGXQCwRPFbndqwTgLJh8kYxST4Z0vgh72U
|
TELEGRAM_BOT_TOKEN=8410461852:AAGXQCwRPFbndqwTgLJh8kYxST4Z0vgh72U
|
||||||
TELEGRAM_CHAT_IDS=-5075171894
|
TELEGRAM_CHAT_IDS=
|
||||||
|
# TELEGRAM_BOT_TOKEN=8410461852:AAGXQCwRPFbndqwTgLJh8kYxST4Z0vgh72U
|
||||||
|
# TELEGRAM_CHAT_IDS=-5075171894
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -45,6 +45,9 @@ interface LocationTestWrapperProps {
|
||||||
children: ReactNode;
|
children: ReactNode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Feature flag to enable/disable location warning dialogs
|
||||||
|
const ENABLE_LOCATION_WARNINGS = false;
|
||||||
|
|
||||||
const LocationTestWrapper: React.FC<LocationTestWrapperProps> = ({ children }) => {
|
const LocationTestWrapper: React.FC<LocationTestWrapperProps> = ({ children }) => {
|
||||||
// Skip location checks entirely for emulators
|
// Skip location checks entirely for emulators
|
||||||
if (isEmulator()) {
|
if (isEmulator()) {
|
||||||
|
|
@ -62,7 +65,7 @@ const LocationTestWrapper: React.FC<LocationTestWrapperProps> = ({ children }) =
|
||||||
);
|
);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (locationCheck && !locationCheck.isInside) {
|
if (ENABLE_LOCATION_WARNINGS && locationCheck && !locationCheck.isInside) {
|
||||||
setLocationErrorDialogOpen(true);
|
setLocationErrorDialogOpen(true);
|
||||||
}
|
}
|
||||||
}, [locationCheck]);
|
}, [locationCheck]);
|
||||||
|
|
@ -73,7 +76,7 @@ const LocationTestWrapper: React.FC<LocationTestWrapperProps> = ({ children }) =
|
||||||
if (status === 'granted') {
|
if (status === 'granted') {
|
||||||
const location = await Location.getCurrentPositionAsync({});
|
const location = await Location.getCurrentPositionAsync({});
|
||||||
setUserLocation(location);
|
setUserLocation(location);
|
||||||
} else {
|
} else if (ENABLE_LOCATION_WARNINGS) {
|
||||||
setLocationDialogOpen(true);
|
setLocationDialogOpen(true);
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
|
|
|
||||||
|
|
@ -112,6 +112,16 @@ const AddressForm: React.FC<AddressFormProps> = ({ onSuccess, initialValues, isE
|
||||||
>
|
>
|
||||||
<MyText style={tw`text-xl font-bold mb-4`}>{isEdit ? 'Edit Address' : 'Add Address'}</MyText>
|
<MyText style={tw`text-xl font-bold mb-4`}>{isEdit ? 'Edit Address' : 'Add Address'}</MyText>
|
||||||
|
|
||||||
|
{/* Service Area Notice */}
|
||||||
|
<View style={tw`bg-amber-50 border border-amber-200 rounded-lg p-3 mb-4`}>
|
||||||
|
<View style={tw`flex-row items-center`}>
|
||||||
|
<MyText style={tw`text-amber-600 mr-2`}>ℹ️</MyText>
|
||||||
|
<MyText style={tw`text-amber-800 text-sm flex-1`}>
|
||||||
|
We currently serve only in Mahabubnagar town
|
||||||
|
</MyText>
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
|
||||||
{/* Submit Error Message */}
|
{/* Submit Error Message */}
|
||||||
{submitError && (
|
{submitError && (
|
||||||
<View style={tw`bg-red-50 border border-red-200 rounded-lg p-3 mb-4`}>
|
<View style={tw`bg-red-50 border border-red-200 rounded-lg p-3 mb-4`}>
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue