Skip to content

Commit

Permalink
no city set -> back to search
Browse files Browse the repository at this point in the history
  • Loading branch information
martinheppner committed Sep 15, 2024
1 parent 5365582 commit dbeb24a
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/views/Main/DetailReworked.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,12 @@ const DetailReworked = (props) => {
};

const handleCloseTab = () => {
window.close();
if (!!_city && _city !== "no-city" && !!idOne) {
window.close();
}
else {
goToSearchPage();
}
};

const navigate = useNavigate();
Expand All @@ -123,10 +128,6 @@ const DetailReworked = (props) => {
setCityI(_city);
}, [_city]);

// const goToStartPage = () => {
// let city = searchParams.get("city");
// navigate(`/?${!!city ? "city=" + city : ""}`);
// };

const goToSearchPage = () => {
!!cityOne && (cityOne !== "no-city") ?
Expand Down

0 comments on commit dbeb24a

Please sign in to comment.