Skip to content

Commit

Permalink
tweak handle overpass
Browse files Browse the repository at this point in the history
  • Loading branch information
yuiseki committed Jan 7, 2024
1 parent 7d858e2 commit 5e42fe6
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ export default function Home() {
retry: boolean
) => {
const newGeojson = osmtogeojson(overpassResponseJson);
console.log("features", newGeojson.features.length);
if (newGeojson.features.length !== 0) {
setGeojsonWithStyleList((prev) => {
return [
Expand All @@ -225,19 +226,19 @@ export default function Home() {
}
} else {
if (retry) {
getOverpassResponseJsonWithCache(overpassQuery).then(
getOverpassResponseJsonWithCache(overpassQuery.replace('["name"', '["name:en"')).then(
(overpassResponseJson) => {
handleOverpassResponseJson(overpassResponseJson, false);
}
);
}
}
};
getOverpassResponseJsonWithCache(
overpassQuery
).then((overpassResponseJson) => {
handleOverpassResponseJson(overpassResponseJson, true);
});
getOverpassResponseJsonWithCache(overpassQuery).then(
(overpassResponseJson) => {
handleOverpassResponseJson(overpassResponseJson, true);
}
);
});
}, [inputText, insertNewDialogue, pastMessages, scrollToBottom]);

Expand Down

1 comment on commit 5e42fe6

@vercel
Copy link

@vercel vercel bot commented on 5e42fe6 Jan 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.