From 4a247b752e8652abf409775bc8008482a9546ad3 Mon Sep 17 00:00:00 2001
From: MohamedBassem <me@mbassem.com>
Date: Wed, 13 Mar 2024 03:10:06 +0000
Subject: fix(mobile): Fix invalidation after the sharing and add a placeholder
 image

---
 packages/mobile/components/bookmarks/BookmarkCard.tsx | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

(limited to 'packages/mobile/components/bookmarks/BookmarkCard.tsx')

diff --git a/packages/mobile/components/bookmarks/BookmarkCard.tsx b/packages/mobile/components/bookmarks/BookmarkCard.tsx
index 57e601f7..607c2fc8 100644
--- a/packages/mobile/components/bookmarks/BookmarkCard.tsx
+++ b/packages/mobile/components/bookmarks/BookmarkCard.tsx
@@ -85,12 +85,18 @@ function LinkCard({ bookmark }: { bookmark: ZBookmark }) {
 
   const parsedUrl = new URL(bookmark.content.url);
 
+  const imageComp = bookmark.content.imageUrl ? (
+    <Image
+      source={{ uri: bookmark.content.imageUrl }}
+      className="h-56 min-h-56 w-full"
+    />
+  ) : (
+    <View className="h-56" />
+  );
+
   return (
     <View className="flex gap-2">
-      <Image
-        source={{ uri: bookmark.content.imageUrl || "" }}
-        className="h-56 min-h-56 w-full"
-      />
+      {imageComp}
       <View className="flex gap-2">
         <Text className="line-clamp-2 text-xl font-bold">
           {bookmark.content.title || parsedUrl.host}
-- 
cgit v1.2.3-70-g09d2

