fix navigation to community from discover communities screen (#16702)

This commit is contained in:
Parvesh Monu 2023-07-17 13:56:46 +05:30 committed by GitHub
parent 0067468d57
commit bb3b3061c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -28,12 +28,12 @@
cover {:uri (get-in (:images item) [:banner :uri])}]
(if (= view-type :card-view)
[quo/community-card-view-item (assoc item :width width :cover cover)
#(rf/dispatch [:navigate-to :community-overview (:id item)])]
#(rf/dispatch [:communities/navigate-to-community (:id item)])]
[quo/community-list-item
{:on-press (fn []
(rf/dispatch [:communities/load-category-states (:id item)])
(rf/dispatch [:dismiss-keyboard])
(rf/dispatch [:navigate-to :community-overview (:id item)]))
(rf/dispatch [:communities/navigate-to-community (:id item)]))
:on-long-press #(rf/dispatch
[:show-bottom-sheet
{:content (fn []
@ -141,12 +141,12 @@
(merge community
(get mock-community-item-data :data)
{:cover cover})
#(rf/dispatch [:navigate-to :community-overview (:id community)])]
#(rf/dispatch [:communities/navigate-to-community (:id community)])]
[quo/community-list-item
{:on-press (fn []
(rf/dispatch [:communities/load-category-states (:id community)])
(rf/dispatch [:dismiss-keyboard])
(rf/dispatch [:navigate-to :community-overview (:id community)]))
(rf/dispatch [:communities/navigate-to-community (:id community)]))
:on-long-press #(js/alert "TODO: to be implemented")}
(merge community
(get mock-community-item-data :data))])]))