Skip to content

Commit f114908

Browse files
authored
updated leave button background color to community color
1 parent b0964ef commit f114908

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

src/status_im/contexts/communities/actions/community_options/view.cljs

+7-7
Original file line numberDiff line numberDiff line change
@@ -112,13 +112,13 @@
112112
:on-press #(hide-sheet-and-dispatch [:communities/share-community-pressed id])})
113113

114114
(defn leave-community
115-
[id]
115+
[id color]
116116
{:icon :i/log-out
117117
:label (i18n/label :t/leave-community)
118118
:accessibility-label :leave-community
119119
:danger? true
120120
:on-press #(rf/dispatch [:show-bottom-sheet
121-
{:content (fn [] [leave-menu/leave-sheet id])}])})
121+
{:content (fn [] [leave-menu/leave-sheet id color])}])})
122122

123123
(defn cancel-request-to-join
124124
[id request-id]
@@ -152,7 +152,7 @@
152152
(not-joined-options id token-gated? pending?)))
153153

154154
(defn joined-options
155-
[id token-gated? muted? muted-till]
155+
[id token-gated? muted? muted-till color]
156156
[[(view-members id)
157157
(view-rules id)
158158
(when token-gated? (view-token-gating id))
@@ -164,7 +164,7 @@
164164
(invite-contacts id)
165165
(show-qr id)
166166
(share-community id)]
167-
[(assoc (leave-community id) :add-divider? true)]])
167+
[(assoc (leave-community id color) :add-divider? true)]])
168168

169169
(defn owner-options
170170
[id token-gated? muted? muted-till]
@@ -181,11 +181,11 @@
181181
(defn get-context-drawers
182182
[{:keys [id]}]
183183
(let [{:keys [token-permissions admin joined
184-
muted banList muted-till]} (rf/sub [:communities/community id])
185-
request-id (rf/sub [:communities/my-pending-request-to-join id])]
184+
muted banList muted-till color]} (rf/sub [:communities/community id])
185+
request-id (rf/sub [:communities/my-pending-request-to-join id])]
186186
(cond
187187
admin (owner-options id token-permissions muted muted-till)
188-
joined (joined-options id token-permissions muted muted-till)
188+
joined (joined-options id token-permissions muted muted-till color)
189189
request-id (join-request-sent-options id token-permissions request-id)
190190
banList (banned-options id token-permissions)
191191
:else (not-joined-options id token-permissions request-id))))

src/status_im/contexts/communities/actions/leave/view.cljs

+4-3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
(rf/dispatch event))
1414

1515
(defn leave-sheet
16-
[id]
16+
[id color]
1717
[generic-menu/view
1818
{:id id
1919
:title (i18n/label :t/leave-community?)}
@@ -31,8 +31,9 @@
3131
:container-style style/cancel-button}
3232
(i18n/label :t/cancel)]
3333
[quo/button
34-
{:on-press #(hide-sheet-and-dispatch [:communities/leave id])
35-
:container-style style/action-button}
34+
{:on-press #(hide-sheet-and-dispatch [:communities/leave id])
35+
:customization-color color
36+
:container-style style/action-button}
3637
(i18n/label :t/leave-community)]]]])
3738

3839
(defn cancel-request-sheet

0 commit comments

Comments
 (0)