Skip to content

Commit

Permalink
created message that appears if rates are not found, links to allconn…
Browse files Browse the repository at this point in the history
…ect sight with postcode.
  • Loading branch information
mmt456 committed Jun 27, 2024
1 parent 4745dd9 commit 61a63b5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/vis/MeasurementMap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ function searchEventHandler(result: any): void {
function organizePopup(apiText: any, postcode: any, lon: any, lat: any): string{
let dict = JSON.parse(apiText);
console.log(dict);
if(Object.keys(dict).length == 0) {
return "No prices could be found." + "Visit <a href='https://www.allconnect.com/results/providers?zip=" + postcode + "'>allconnect.com</a>" + " to see provider rates in your area.";
}
let returnString = "<table style='border:1px solid black;'>"
+ "<b>" + "<tr>"
+ "<th style='border:1px solid black;'>" + "Provider" + "</th>"
Expand Down

0 comments on commit 61a63b5

Please sign in to comment.