Skip to content

Commit

Permalink
Better support for SVGs
Browse files Browse the repository at this point in the history
  • Loading branch information
ibrkhalil committed Feb 26, 2024
1 parent 274eabb commit b8d2e0c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
20 changes: 12 additions & 8 deletions src/quo/components/links/url_preview/view.cljs
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
(ns quo.components.links.url-preview.view
(:require
[clojure.string :as string]
[quo.components.icon :as icon]
[quo.components.links.url-preview.style :as style]
[quo.components.markdown.text :as text]
[quo.foundations.colors :as colors]
[react-native.core :as rn]))
[react-native.core :as rn]
[react-native.svg :as svg]))

(defn- logo-comp
[{:keys [logo]}]
[rn/image
{:accessibility-label :logo
:source (if (string? logo)
{:uri logo}
logo)
:style style/logo
:resize-mode :cover}])
(if (string/starts-with? logo "<svg")
[svg/svg-xml (merge style/logo {:xml logo})]
[rn/image
{:accessibility-label :logo
:source (if (string? logo)
{:uri logo}
logo)
:style style/logo
:resize-mode :cover}]))

(defn- content
[{:keys [title body]}]
Expand Down
4 changes: 2 additions & 2 deletions status-go-version.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"owner": "status-im",
"repo": "status-go",
"version": "add-favicons-to-link-previews",
"commit-sha1": "4f4af45a7d8b4f4beab17e29f8b236995f658650",
"src-sha256": "146bwfd7a8cf5kv5rwh65kb0bswn3np825815841dg0cvxxal746"
"commit-sha1": "55b2907a722f872dd21c42198a25be927a22e03d",
"src-sha256": "0ll52y37rvc3j6w3bdvfnhjw9sgfsp0m5wc26j428pb2xgipr6jd"
}

0 comments on commit b8d2e0c

Please sign in to comment.