Skip to content

Commit

Permalink
feature(mobile): Add a floating button for quickly adding new bookmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
MohamedBassem committed Sep 8, 2024
1 parent 3944505 commit 2bfa73f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions apps/mobile/app/dashboard/(tabs)/index.tsx
Original file line number Diff line number Diff line change
@@ -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";
Expand All @@ -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,
Expand Down Expand Up @@ -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>
);
}

0 comments on commit 2bfa73f

Please sign in to comment.