From cccf5ed015db5a32ea96a7b997cf0b323cccd156 Mon Sep 17 00:00:00 2001 From: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com> Date: Thu, 3 Aug 2023 16:58:14 +0800 Subject: [PATCH] Update on-press on collectible component (#16837) This commit adds the "on-press" prop to the "collectible" component which is required for navigating to other screens, such as the details screen when we will start building the wallet. Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com> --- src/quo2/components/profile/collectible/view.cljs | 6 ++++-- .../contexts/quo_preview/profile/collectible.cljs | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/quo2/components/profile/collectible/view.cljs b/src/quo2/components/profile/collectible/view.cljs index 219e4afe80..3abd3cc9f5 100644 --- a/src/quo2/components/profile/collectible/view.cljs +++ b/src/quo2/components/profile/collectible/view.cljs @@ -91,7 +91,9 @@ [remaining-tiles (- (count remaining-images) 3)]])]])))) (defn collectible - [{:keys [images]}] + [{:keys [images on-press]}] [rn/view {:style style/tile-outer-container} - [rn/view {:style style/tile-inner-container} + [rn/pressable + {:on-press on-press + :style style/tile-inner-container} [tile-container {:images images}]]]) diff --git a/src/status_im2/contexts/quo_preview/profile/collectible.cljs b/src/status_im2/contexts/quo_preview/profile/collectible.cljs index 64a87456a4..82701ea029 100644 --- a/src/status_im2/contexts/quo_preview/profile/collectible.cljs +++ b/src/status_im2/contexts/quo_preview/profile/collectible.cljs @@ -36,7 +36,9 @@ [rn/view {:padding-vertical 100 :align-items :center} - [quo/collectible {:images images-to-show}]]])))) + [quo/collectible + {:images images-to-show + :on-press #(js/alert "Pressed")}]]])))) (defn preview-collectible []