From 4099b62b7c79b7ff2a2b4a5243788ceb42dc39a0 Mon Sep 17 00:00:00 2001
From: MohamedBassem <me@mbassem.com>
Date: Wed, 13 Mar 2024 04:45:10 +0000
Subject: fix(mobile): Make links clickable

---
 packages/mobile/components/bookmarks/BookmarkCard.tsx | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

(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 30c6724a..9b8b72f8 100644
--- a/packages/mobile/components/bookmarks/BookmarkCard.tsx
+++ b/packages/mobile/components/bookmarks/BookmarkCard.tsx
@@ -1,4 +1,5 @@
 import { ZBookmark } from "@hoarder/trpc/types/bookmarks";
+import * as WebBrowser from "expo-web-browser";
 import { Star, Archive, Trash } from "lucide-react-native";
 import { View, Text, Image, ScrollView, Pressable } from "react-native";
 import Markdown from "react-native-markdown-display";
@@ -131,7 +132,10 @@ function LinkCard({ bookmark }: { bookmark: ZBookmark }) {
     <View className="flex gap-2">
       {imageComp}
       <View className="flex gap-2">
-        <Text className="line-clamp-2 text-xl font-bold">
+        <Text
+          className="line-clamp-2 text-xl font-bold"
+          onPress={() => WebBrowser.openBrowserAsync(bookmark.content.url)}
+        >
           {bookmark.content.title || parsedUrl.host}
         </Text>
         <TagList bookmark={bookmark} />
-- 
cgit v1.2.3-70-g09d2

