added intl for qr failure warning

This commit is contained in:
Sadaqat Ali 2022-08-13 12:45:11 +05:00
parent 54d5e55406
commit 9bfe9f392d
2 changed files with 21 additions and 15 deletions

View File

@ -110,22 +110,26 @@ export const QRModal = ({}: QRModalProps) => {
_onClose();
navigate(deepLinkData);
} else {
Alert.alert('Unsupported URL!', 'Please scan a valid ecency url.', [
{
text: 'Close',
onPress: () => {
_onClose();
Alert.alert(
intl.formatMessage({ id: 'qr.unsupported_alert_title' }),
intl.formatMessage({ id: 'qr.unsupported_alert_desc' }),
[
{
text: 'Close',
onPress: () => {
_onClose();
},
style: 'cancel',
},
style: 'cancel',
},
{
text: 'Rescan',
onPress: () => {
setIsScannerActive(true);
scannerRef.current?.reactivate();
{
text: 'Rescan',
onPress: () => {
setIsScannerActive(true);
scannerRef.current?.reactivate();
},
},
},
]);
],
);
}
};

View File

@ -826,7 +826,9 @@
"qr":{
"qr_scan": "QR Scan",
"open": "Open URL",
"detected_url": "Detected URL"
"detected_url": "Detected URL",
"unsupported_alert_title": "Unsupported URL!",
"unsupported_alert_desc": "Please scan a valid ecency url."
},
"history": {
"edit": "Edit History",