From dbb2ac78fe0cdbe5d8a9d16b5c9fb214b0b2f8a9 Mon Sep 17 00:00:00 2001 From: Ajay Sivan Date: Mon, 30 Oct 2023 06:37:28 -0700 Subject: [PATCH] Remove all status-im.ui.components.react usages in status-im2 (#17750) --- src/status_im2/contexts/chat/messages/drawers/view.cljs | 4 ++-- .../contexts/chat/messages/link_preview/style.cljs | 8 ++------ src/status_im2/contexts/communities/discover/view.cljs | 3 +-- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/src/status_im2/contexts/chat/messages/drawers/view.cljs b/src/status_im2/contexts/chat/messages/drawers/view.cljs index 12a58d1d35f..3bec8d8568c 100644 --- a/src/status_im2/contexts/chat/messages/drawers/view.cljs +++ b/src/status_im2/contexts/chat/messages/drawers/view.cljs @@ -2,10 +2,10 @@ (:require [quo.components.selectors.reaction-resource :as reactions.resource] [quo.core :as quo] + [react-native.clipboard :as clipboard] [react-native.core :as rn] [react-native.gesture :as gesture] [reagent.core :as reagent] - [status-im.ui.components.react :as react] [status-im2.common.contact-list-item.view :as contact-list-item] [status-im2.constants :as constants] [status-im2.contexts.chat.composer.reply.view :as reply] @@ -119,7 +119,7 @@ (when (and (not (or deleted? deleted-for-me?)) (not= content-type constants/content-type-audio)) [{:type :main - :on-press #(react/copy-to-clipboard + :on-press #(clipboard/set-string (reply/get-quoted-text-with-mentions (get content :parsed-text))) :label (i18n/label :t/copy-text) diff --git a/src/status_im2/contexts/chat/messages/link_preview/style.cljs b/src/status_im2/contexts/chat/messages/link_preview/style.cljs index bd0b258b838..5f9dd46d52b 100644 --- a/src/status_im2/contexts/chat/messages/link_preview/style.cljs +++ b/src/status_im2/contexts/chat/messages/link_preview/style.cljs @@ -2,12 +2,9 @@ (:require [quo.foundations.colors :as colors] [quo.foundations.typography :as typography] - [status-im.ui.components.react :as react])) + [react-native.core :as rn])) -(def screen-width - (-> "window" - react/get-dimensions - :width)) +(def screen-width (:width (rn/get-window))) (defn scale-dimensions "Scale a given height and width to be maximum percentage allowed of the screen width" @@ -82,4 +79,3 @@ {:height 170}) {:overflow :hidden :border-radius 12})) - diff --git a/src/status_im2/contexts/communities/discover/view.cljs b/src/status_im2/contexts/communities/discover/view.cljs index 53f03757c71..84f15feaae0 100644 --- a/src/status_im2/contexts/communities/discover/view.cljs +++ b/src/status_im2/contexts/communities/discover/view.cljs @@ -6,7 +6,6 @@ [quo.theme :as quo.theme] [react-native.core :as rn] [reagent.core :as reagent] - [status-im.ui.components.react :as react] [status-im2.common.scroll-page.view :as scroll-page] [status-im2.contexts.communities.actions.community-options.view :as options] [status-im2.contexts.communities.discover.style :as style] @@ -117,7 +116,7 @@ featured-communities view-type selected-tab]}] - [react/animated-view + [rn/view [screen-title] (when (pos? featured-communities-count) [:<>