Skip to content

Commit 6ee8fd8

Browse files
[#19037] fix: address reviewer feedbacks
1 parent 2f405dd commit 6ee8fd8

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

src/status_im/common/validation/profile.cljs

+3-3
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
(defn validation-name
3030
[s]
3131
(cond
32-
(or (= s nil) (= s "")) nil
32+
(string/blank? s) nil
3333
(string/ends-with? s "-eth") (i18n/label :t/ending-not-allowed {:ending "-eth"})
3434
(string/ends-with? s "_eth") (i18n/label :t/ending-not-allowed {:ending "_eth"})
3535
(string/ends-with? s ".eth") (i18n/label :t/ending-not-allowed {:ending ".eth"})
@@ -45,7 +45,7 @@
4545
(defn validation-bio
4646
[s]
4747
(cond
48-
(or (= s nil) (= s "")) nil
48+
(string/blank? s) nil
4949
(has-emojis? s) (i18n/label :t/are-not-allowed {:check (i18n/label :t/emojis)})
5050
(has-special-characters? s) (i18n/label :t/are-not-allowed
5151
{:check (i18n/label :t/special-characters)})
@@ -54,7 +54,7 @@
5454
(defn validation-nickname
5555
[s]
5656
(cond
57-
(or (= s nil) (= s "")) nil
57+
(string/blank? s) nil
5858
(has-emojis? s) (i18n/label :t/are-not-allowed {:check (i18n/label :t/emojis)})
5959
(has-special-characters? s) (i18n/label :t/are-not-allowed
6060
{:check (i18n/label :t/special-characters)})

src/status_im/contexts/profile/contact/add_nickname/view.cljs

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
[]
1616
(let [{:keys [public-key primary-name nickname customization-color]
1717
:as profile} (rf/sub [:contacts/current-contact])
18-
;; TODO: remove :blue when #18733 merged.
18+
;; TODO(@mohsen): remove :blue, https://github.com/status-im/status-mobile/issues/18733
1919
customization-color (or customization-color :blue)
2020
full-name (profile.utils/displayed-name profile)
2121
profile-picture (profile.utils/photo profile)
@@ -67,8 +67,8 @@
6767
[info-message/info-message
6868
{:icon :i/info
6969
:size :default
70-
:type (if (not (string/blank? error-msg)) :error :default)}
71-
(if (not (string/blank? error-msg))
70+
:type (if-not (string/blank? error-msg) :error :default)}
71+
(if-not (string/blank? error-msg)
7272
error-msg
7373
(i18n/label :t/nickname-visible-to-you))]]
7474
[quo/bottom-actions

src/status_im/contexts/profile/contact/view.cljs

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
{:navigate-back? true
2222
:height 148
2323
:on-scroll #(reanimated/set-shared-value scroll-y %)
24-
;TODO remove colors/primary-50 when #18733 merged.
24+
;; TODO(@mohsen): remove colors/primary-50, https://github.com/status-im/status-mobile/issues/18733
2525
:cover-color (or customization-color colors/primary-50)
2626
:background-color (colors/theme-colors colors/white colors/neutral-95 theme)
2727
:page-nav-props {:right-side [{:icon-name :i/options

0 commit comments

Comments
 (0)