From 9ed6d5f3609652f82f5440e8cd5372a623f39c58 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Thu, 11 Jan 2024 15:25:00 +0100 Subject: [PATCH] :bug: Use correct jsx handler on team choice form --- frontend/src/app/main/ui/components/forms.cljs | 6 ++---- .../src/app/main/ui/onboarding/team_choice.cljs | 15 +++++++-------- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/frontend/src/app/main/ui/components/forms.cljs b/frontend/src/app/main/ui/components/forms.cljs index 287206400..267cf66be 100644 --- a/frontend/src/app/main/ui/components/forms.cljs +++ b/frontend/src/app/main/ui/components/forms.cljs @@ -288,8 +288,7 @@ (mf/defc submit-button* {::mf/wrap-props false} [{:keys [on-click children label form class-name name disabled] :as props}] - (let [form (or (unchecked-get props "form") - (mf/use-ctx form-ctx)) + (let [form (or form (mf/use-ctx form-ctx)) disabled? (or (and (some? form) (not (:valid @form))) (true? disabled)) @@ -315,8 +314,7 @@ (obj/set! "name" name) (obj/set! "label" mf/undefined) (obj/set! "className" class) - (obj/set! "type" "submit")) - ] + (obj/set! "type" "submit"))] [:> "button" props (if (some? children) diff --git a/frontend/src/app/main/ui/onboarding/team_choice.cljs b/frontend/src/app/main/ui/onboarding/team_choice.cljs index f850128ac..9cee007d9 100644 --- a/frontend/src/app/main/ui/onboarding/team_choice.cljs +++ b/frontend/src/app/main/ui/onboarding/team_choice.cljs @@ -102,8 +102,8 @@ :label (tr "onboarding.choice.team-up.create-team-placeholder")}] [:div {:class (stl/css :action-buttons)} - [:& fm/submit-button* - {:className (stl/css :accept-button) + [:> fm/submit-button* + {:class (stl/css :accept-button) :label (tr "onboarding.choice.team-up.continue-creating-team")}]]]] [:div {:class (stl/css :second-block)} [:h2 {:class (stl/css :modal-title)} @@ -236,12 +236,11 @@ :step 2}))} (tr "labels.back")] - [:& fm/submit-button* - {:className (stl/css :accept-button) - :label - (if (> (count emails) 0) - (tr "onboarding.choice.team-up.create-team-and-invite") - (tr "onboarding.choice.team-up.create-team-without-invite"))}]] + [:> fm/submit-button* + {:class (stl/css :accept-button) + :label (if (> (count emails) 0) + (tr "onboarding.choice.team-up.create-team-and-invite") + (tr "onboarding.choice.team-up.create-team-without-invite"))}]] [:div {:class (stl/css :modal-hint)} (tr "onboarding.choice.team-up.create-team-and-send-invites-description")]]]