aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiguel Ángel Moreno <mail@migalmoreno.com>2024-12-19 03:23:32 +0100
committerMiguel Ángel Moreno <mail@migalmoreno.com>2024-12-19 03:23:32 +0100
commit46978228ea16853d8a50b9048ebe4048bad6c681 (patch)
treeba480350c9269e26fd34a83af3303e43d8035204
parent4758d890e45e1ad68d52feebf8e767dfda1a6e72 (diff)
feat: add fallback for tabs without selected-id
-rw-r--r--src/frontend/tubo/layout/views.cljs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/frontend/tubo/layout/views.cljs b/src/frontend/tubo/layout/views.cljs
index 901d9be..c19b4fd 100644
--- a/src/frontend/tubo/layout/views.cljs
+++ b/src/frontend/tubo/layout/views.cljs
@@ -282,7 +282,7 @@
[:ul.w-full.flex.gap-x-4.justify-center.items-center]
(when (seq tabs)
(for [[i tab] (map-indexed vector tabs)]
- (let [selected? (= (:id tab) selected-id)]
+ (let [selected? (= (:id tab) (or selected-id (:id @!current)))]
(when tab
[:li.flex-auto.flex.justify-center.items-center.font-semibold.border-b-2
{:class (if selected?