Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use more user friendly error messages
Browse files Browse the repository at this point in the history
khavinshankar committed Jul 31, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 2c7b04a commit 25ab42a
Showing 2 changed files with 6 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/Components/Assets/AssetsList.tsx
Original file line number Diff line number Diff line change
@@ -121,7 +121,7 @@ const AssetsList = () => {
if (!isValidURL(assetURL)) {
setIsLoading(false);
Notification.Error({
msg: "Invalid QR code scanned !!!",
msg: t("invalid_asset_id_msg"),
});
return;
}
@@ -137,7 +137,7 @@ const AssetsList = () => {
if (!data) {
setIsLoading(false);
Notification.Error({
msg: "Invalid QR code scanned !!!",
msg: t("invalid_asset_id_msg"),
});
return;
}
@@ -151,13 +151,13 @@ const AssetsList = () => {
} else {
setIsLoading(false);
Notification.Error({
msg: "Asset not found !!!",
msg: t("asset_not_found_msg"),
});
}
} else {
setIsLoading(false);
Notification.Error({
msg: "Invalid QR code scanned !!!",
msg: t("invalid_asset_id_msg"),
});
}
} catch (err) {
3 changes: 2 additions & 1 deletion src/Locale/en/Notifications.json
Original file line number Diff line number Diff line change
@@ -17,5 +17,6 @@
"unsubscribe": "Unsubscribe",
"escape": "Escape",
"loading": "Loading...",
"invalid_asset_id_msg": "Oops! The asset ID you entered does not appear to be valid."
"invalid_asset_id_msg": "Oops! The asset ID you entered does not appear to be valid.",
"asset_not_found_msg": "Oops! The asset you are looking for does not exist. Please check the asset id."
}

0 comments on commit 25ab42a

Please sign in to comment.