From 78f4d9cc5d0e52650b09f4ab2d392e6306562f02 Mon Sep 17 00:00:00 2001 From: Alejandro Alonso Date: Wed, 28 Aug 2024 12:54:26 +0200 Subject: [PATCH] :tada: Revert test A/B for starting with light theme This reverts commit b0af94415fbdb2b5d27748663d74c9078e6c0c41. --- frontend/src/app/main/data/users.cljs | 4 +--- frontend/src/app/main/ui/auth.cljs | 7 +------ frontend/src/app/main/ui/auth/register.cljs | 4 +--- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/frontend/src/app/main/data/users.cljs b/frontend/src/app/main/data/users.cljs index fe5f12aba..375119931 100644 --- a/frontend/src/app/main/data/users.cljs +++ b/frontend/src/app/main/data/users.cljs @@ -19,7 +19,6 @@ [app.main.data.websocket :as ws] [app.main.features :as features] [app.main.repo :as rp] - [app.util.dom :as dom] [app.util.i18n :as i18n :refer [tr]] [app.util.router :as rt] [app.util.storage :refer [storage]] @@ -136,8 +135,7 @@ (swap! storage assoc :profile profile) (i18n/set-locale! (:lang profile)) (when (not= previous-email email) - (set-current-team! nil)) - (dom/set-html-theme-color (or (:theme profile) "default"))))))) + (set-current-team! nil))))))) (defn fetch-profile [] diff --git a/frontend/src/app/main/ui/auth.cljs b/frontend/src/app/main/ui/auth.cljs index c9773fee9..c22ec0902 100644 --- a/frontend/src/app/main/ui/auth.cljs +++ b/frontend/src/app/main/ui/auth.cljs @@ -48,16 +48,11 @@ (not= section :auth-register-validate) (not= section :auth-register-success)) params (:query-params route) - error (:error params) - default-light? (cf/external-feature-flag "onboarding-02" "test")] + error (:error params)] (mf/with-effect [] (dom/set-html-title (tr "title.default"))) - (mf/with-effect [default-light?] - (when default-light? - (dom/set-html-theme-color "light"))) - (mf/with-effect [error] (when error (st/emit! (du/show-redirect-error error)))) diff --git a/frontend/src/app/main/ui/auth/register.cljs b/frontend/src/app/main/ui/auth/register.cljs index 6c0ba1a19..f1c0dfb2c 100644 --- a/frontend/src/app/main/ui/auth/register.cljs +++ b/frontend/src/app/main/ui/auth/register.cljs @@ -228,7 +228,6 @@ :initial params) submitted? (mf/use-state false) - theme (when (cf/external-feature-flag "onboarding-02" "test") "light") on-success (mf/use-fn @@ -247,8 +246,7 @@ (mf/use-fn (fn [form _] (reset! submitted? true) - (let [params (cond-> (:clean-data @form) - (some? theme) (assoc :theme theme))] + (let [params (:clean-data @form)] (->> (rp/cmd! :register-profile params) (rx/finalize #(reset! submitted? false)) (rx/subs! on-success on-error)))))]