From bad9aa9e2041f7de543eb55d913e315bc5c82ab4 Mon Sep 17 00:00:00 2001 From: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com> Date: Fri, 4 Aug 2023 19:52:43 +0800 Subject: [PATCH] [Fix] Crash on onboarding due to nil value (#16884) Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com> --- .../onboarding/new_to_status/view.cljs | 27 ++++++++++--------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/src/status_im2/contexts/onboarding/new_to_status/view.cljs b/src/status_im2/contexts/onboarding/new_to_status/view.cljs index 01808bb4de..39132a4a08 100644 --- a/src/status_im2/contexts/onboarding/new_to_status/view.cljs +++ b/src/status_im2/contexts/onboarding/new_to_status/view.cljs @@ -110,19 +110,20 @@ :icon-background :blur :icon :i/arrow-left :on-press navigate-back} - :right-section-buttons [(when config/quo-preview-enabled? - {:type :grey - :icon :i/reveal-whitelist - :icon-background :blur - :on-press #(rf/dispatch [:navigate-to - :quo2-preview])}) - {:type :grey - :icon :i/info - :icon-background :blur - :on-press #(rf/dispatch - [:show-bottom-sheet - {:content getting-started-doc - :shell? true}])}]}]]) + :right-section-buttons (cond-> [{:type :grey + :icon :i/info + :icon-background :blur + :on-press #(rf/dispatch + [:show-bottom-sheet + {:content getting-started-doc + :shell? true}])}] + + config/quo-preview-enabled? + (conj {:type :grey + :icon :i/reveal-whitelist + :icon-background :blur + :on-press #(rf/dispatch [:navigate-to + :quo2-preview])}))}]]) (defn new-to-status []