From 2bfa73f16cec1dd9d90f49786405f248fc431894 Mon Sep 17 00:00:00 2001
From: MohamedBassem <me@mbassem.com>
Date: Sun, 8 Sep 2024 18:32:24 +0100
Subject: feature(mobile): Add a floating button for quickly adding new
 bookmarks

---
 apps/mobile/app/dashboard/(tabs)/index.tsx | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

(limited to 'apps/mobile/app/dashboard/(tabs)/index.tsx')

diff --git a/apps/mobile/app/dashboard/(tabs)/index.tsx b/apps/mobile/app/dashboard/(tabs)/index.tsx
index bd7ce3ea..14c2d270 100644
--- a/apps/mobile/app/dashboard/(tabs)/index.tsx
+++ b/apps/mobile/app/dashboard/(tabs)/index.tsx
@@ -1,5 +1,5 @@
 import { useRef } from "react";
-import { Platform, View } from "react-native";
+import { Platform, Pressable, View } from "react-native";
 import * as Haptics from "expo-haptics";
 import * as ImagePicker from "expo-image-picker";
 import NoteEditorModal from "@/components/bookmarks/NewBookmarkModal";
@@ -11,7 +11,7 @@ import useAppSettings from "@/lib/settings";
 import { useUploadAsset } from "@/lib/upload";
 import { BottomSheetModal } from "@gorhom/bottom-sheet";
 import { MenuView } from "@react-native-menu/menu";
-import { SquarePen } from "lucide-react-native";
+import { Plus, SquarePen } from "lucide-react-native";
 
 function HeaderRight({
   openNewBookmarkModal,
@@ -91,6 +91,12 @@ export default function Home() {
           </View>
         }
       />
+      <Pressable
+        className="absolute bottom-4 right-4 rounded-full bg-foreground p-6"
+        onPress={() => newBookmarkModal.current?.present()}
+      >
+        <Plus size={30} color="white" />
+      </Pressable>
     </CustomSafeAreaView>
   );
 }
-- 
cgit v1.2.3-70-g09d2

