Skip to content

Commit 6a87da1

Browse files
authored
Merge pull request #157 from projectunic0rn/'mobile-trials'
'mobile trials'
2 parents 56ac4b6 + 8bceaad commit 6a87da1

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

src/pages/Home/subcomponents/CityMap.js

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ function CityMap(props) {
155155
newClickedCityArray[newClickedCityArray.length - 1].id === undefined
156156
) {
157157
setTimeout(() => {
158+
158159
addMutationId(data);
159160
}, 1000);
160161
} else {
@@ -603,11 +604,15 @@ function CityMap(props) {
603604
context = 0;
604605
if (event.result.context.length === 1) {
605606
countryISO = event.result.context[0].short_code.toUpperCase();
606-
country = event.result.context[0]["text_en-US"];
607-
}
608-
if (event.result.context[i].id.slice(0, 7) === "country") {
607+
country = event.result.context[0]["text_en-US"] !== undefined
608+
? event.result.context[0]["text_en-US"]
609+
: event.result.context[0]["text"];
610+
} else if (event.result.context[i].id.slice(0, 7) === "country") {
609611
context = i;
610-
country = event.result.context[i]["text_en-US"];
612+
country =
613+
event.result.context[i]["text_en-US"] !== undefined
614+
? event.result.context[i]["text_en-US"]
615+
: event.result.context[i]["text"];
611616
countryISO = event.result.context[i]["short_code"].toUpperCase();
612617
}
613618
}
@@ -747,11 +752,9 @@ function CityMap(props) {
747752
}
748753

749754
function handleTripTimingCityHelper(city) {
750-
alert('Reached')
751755
if (props.currentTiming !== 1) {
752756
calculateNewTravelScore(city, "add");
753757
}
754-
755758
let country = {
756759
country: city.country,
757760
countryISO: city.countryISO,
@@ -779,7 +782,6 @@ function CityMap(props) {
779782
let pastCount = tripTimingCounts[0];
780783
let futureCount = tripTimingCounts[1];
781784
let liveCount = tripTimingCounts[2];
782-
783785
switch (props.currentTiming) {
784786
case 0:
785787
pastCount++;

src/pages/Home/subcomponents/ImportPopup.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import PropTypes from "prop-types";
33

44
import SimpleLoader from "../../../components/common/SimpleLoader/SimpleLoader";
55

6-
export default function ImportPopup(props) {
6+
export default function ImportPopup() {
77
const [taUrl, handleTaUrl] = useState("");
88
const [importComplete, handleImportComplete] = useState(false);
99
const [importStarted, handleImportStarted] = useState(false);

0 commit comments

Comments
 (0)