Skip to content

Commit

Permalink
rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
OmarBasem committed Dec 21, 2022
1 parent 19b832c commit cd7bdbd
Show file tree
Hide file tree
Showing 12 changed files with 992 additions and 1,551 deletions.
66 changes: 0 additions & 66 deletions shadow-cljs.edn
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@

:cache-blockers #{status-im.utils.js-resources status-im.ui.components.icons.icons}

<<<<<<< HEAD
:builds
{:mobile
{:target :react-native
Expand Down Expand Up @@ -101,71 +100,6 @@
:static-fns false
:optimizations :simple
:infer-externs true}}
=======
:builds {:mobile
{:target :react-native
:output-dir "app"
:init-fn status-im2.setup.core/init
;; When false, the Shadow-CLJS watcher won't automatically refresh
;; the target files (a.k.a hot reload). When false, you can manually
;; reload by calling `shadow.cljs.devtools.api/watch-compile-all!`.
:devtools {:autobuild #shadow/env ["SHADOW_AUTOBUILD_ENABLED" :default true :as :bool]}
:dev {:devtools {:after-load status-im2.setup.hot-reload/reload
:build-notify status-im2.setup.hot-reload/build-notify
:preloads [re-frisk-remote.preload]}
:closure-defines
{status-im.utils.config/POKT_TOKEN #shadow/env "POKT_TOKEN"
status-im.utils.config/OPENSEA_API_KEY #shadow/env "OPENSEA_API_KEY"}
:compiler-options {:output-feature-set :es5
:closure-defines
{re-frame.trace/trace-enabled? true}
:source-map false
:infer-externs true}
;; if you want to use a real device, set your local ip
;; in the SHADOW_HOST env variable to make sure that
;; it will use the right interface
:local-ip #shadow/env "SHADOW_HOST"}
:chunks {:fleets status-im.fleet.default-fleet/default-fleets
:chats status-im.chat.default-chats/default-chats}
:release
{:closure-defines
{status-im.utils.config/POKT_TOKEN #shadow/env "POKT_TOKEN"
status-im.utils.config/OPENSEA_API_KEY #shadow/env "OPENSEA_API_KEY"}
:compiler-options {:output-feature-set :es6
;;disable for android build as there
;;is an intermittent warning with deftype
:warnings-as-errors false
:infer-externs :auto
:static-fns true
:fn-invoke-direct true
:optimizations :advanced
:js-options {:js-provider :closure}}}}
;; the tests are ran with node, react-native dependencies are mocked
;; by using node --require override.js, which uses the node-library
;; produced by the target :mocks below and redefines node require
;; function to use the mocks instead of the rn libraries
:test
{:output-to "target/test/test.js"
:output-dir "target/test"
:optimizations :simple
:target :node-test
;; When running tests without a REPL you can uncomment the below line to `make test-watch` a specific file
;:ns-regexp "status-im.chat.models-test$"
:main status-im.test-runner/main
;; set :ui-driven to true to let shadow-cljs inject node-repl
:ui-driven true
:closure-defines
{status-im.utils.config/POKT_TOKEN #shadow/env "POKT_TOKEN"
status-im.utils.config/OPENSEA_API_KEY #shadow/env "OPENSEA_API_KEY"}
:compiler-options {;; needed because we override require and it
;; messes with source-map which reports callstack
;; exceeded exceptions instead of real issues
:source-map false
;; needed because we use deref in tests
:static-fns false
:optimizations :simple
:infer-externs true}}
>>>>>>> 643650b78... refactor

;; mock.js-dependencies is mocking the react-native libraries
;; we build it as a node library so that it can be required by
Expand Down
23 changes: 4 additions & 19 deletions src/quo2/components/avatars/group_avatar.cljs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(ns quo2.components.avatars.group-avatar
(:require [quo2.components.icon :as icon]
[quo2.foundations.colors :as colors]
(:require [quo2.foundations.colors :as colors]
[quo2.components.icon :as icon]
[react-native.core :as rn]))

(def sizes
Expand All @@ -11,25 +11,11 @@
:medium 32
:large 48}})

;; TODO: this implementation does not support group display picture (can only display default group
;; icon).
(defn group-avatar
[_]
;; TODO: this implementation does not support group display picture (can only display default group icon).
(defn group-avatar [_]
(fn [{:keys [color size]}]
(let [container-size (get-in sizes [:container size])
icon-size (get-in sizes [:icon size])]
<<<<<<< HEAD
[rn/view
{:width container-size
:height container-size
:align-items :center
:justify-content :center
:border-radius (/ container-size 2)
:background-color (colors/custom-color-by-theme color 50 60)}
[icon/icon :i/group
{:size icon-size
:color colors/white-opa-70}]])))
=======
[rn/view {:width container-size
:height container-size
:align-items :center
Expand All @@ -39,4 +25,3 @@
:background-color color}
[icon/icon :i/group {:size icon-size
:color colors/white-opa-70}]])))
>>>>>>> 7ce2b16e0... group details screen 3
Loading

0 comments on commit cd7bdbd

Please sign in to comment.