diff --git a/src/main/frontend/components/sidebar.cljs b/src/main/frontend/components/sidebar.cljs index e36ae33de3..4ab5349404 100644 --- a/src/main/frontend/components/sidebar.cljs +++ b/src/main/frontend/components/sidebar.cljs @@ -379,10 +379,9 @@ [page :page])] (state/sidebar-add-block! current-repo db-id block-type))) (reset! sidebar-inited? true)))) - state) - :did-mount (fn [state] - (state/set-state! :mobile/show-tabbar? true) - state)} + (when (state/mobile?) + (state/set-state! :mobile/show-tabbar? true)) + state)} [] (let [default-home (get-default-home-if-valid) current-repo (state/sub :git/current-repo) diff --git a/src/main/frontend/mobile/footer.cljs b/src/main/frontend/mobile/footer.cljs index 932095bde9..01bff9c7da 100644 --- a/src/main/frontend/mobile/footer.cljs +++ b/src/main/frontend/mobile/footer.cljs @@ -46,8 +46,7 @@ (rum/defc footer < rum/reactive [] - (when (and (state/mobile?) - (state/sub :mobile/show-tabbar?) + (when (and (state/sub :mobile/show-tabbar?) (state/get-current-repo)) [:div.cp__footer.w-full.bottom-0.justify-between (audio-record-cp)