diff --git a/src/views/Main/DetailReworked.js b/src/views/Main/DetailReworked.js index aed5103..a14e280 100644 --- a/src/views/Main/DetailReworked.js +++ b/src/views/Main/DetailReworked.js @@ -128,15 +128,10 @@ const DetailReworked = (props) => { // }; const goToSearchPage = () => { - !!searchParams - ? - navigate(`/search/?${searchParams.toString()}`) + !!cityOne && (cityOne !== "no-city") ? + navigate(`/search?city=${cityOne}`) : - !!cityOne ? navigate(`/search/?${!!cityOne}`) - : - navigate(`/search/?city=${!!cityOne}`); - - // window.location.reload(); + navigate(`/search`); }; const LoadingSpinner = () => (