From 46978228ea16853d8a50b9048ebe4048bad6c681 Mon Sep 17 00:00:00 2001 From: Miguel Ángel Moreno Date: Thu, 19 Dec 2024 03:23:32 +0100 Subject: feat: add fallback for tabs without selected-id --- src/frontend/tubo/layout/views.cljs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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? -- cgit v1.2.3