aboutsummaryrefslogtreecommitdiff
path: root/src/frontend
diff options
context:
space:
mode:
Diffstat (limited to 'src/frontend')
-rw-r--r--src/frontend/tubo/events.cljs3
-rw-r--r--src/frontend/tubo/routes.cljs3
2 files changed, 4 insertions, 2 deletions
diff --git a/src/frontend/tubo/events.cljs b/src/frontend/tubo/events.cljs
index dcadf88..afabc3e 100644
--- a/src/frontend/tubo/events.cljs
+++ b/src/frontend/tubo/events.cljs
@@ -171,7 +171,8 @@
(rf/reg-event-db
::toggle-search-form
(fn [db _]
- (assoc db :show-search-form (not (:show-search-form db)))))
+ (when-not (= (-> db :current-match :path) "search")
+ (assoc db :show-search-form (not (:show-search-form db))))))
(rf/reg-event-fx
::toggle-mobile-nav
diff --git a/src/frontend/tubo/routes.cljs b/src/frontend/tubo/routes.cljs
index edbcb00..c089322 100644
--- a/src/frontend/tubo/routes.cljs
+++ b/src/frontend/tubo/routes.cljs
@@ -21,7 +21,8 @@
:name ::search
:controllers [{:parameters {:query [:q :serviceId]}
:start (fn [{{:keys [serviceId q]} :query}]
- (rf/dispatch [::events/get-search-page serviceId q]))}]}]
+ (rf/dispatch [::events/get-search-page serviceId q]))
+ :stop #(rf/dispatch [::events/toggle-search-form])}]}]
["/stream" {:view stream/stream
:name ::stream
:controllers [{:parameters {:query [:url]}