aboutsummaryrefslogtreecommitdiffstats
path: root/apps/mobile/app/dashboard/(tabs)/index.tsx
diff options
context:
space:
mode:
authorMohamedBassem <me@mbassem.com>2024-08-26 17:07:10 +0300
committerMohamedBassem <me@mbassem.com>2024-08-26 17:07:10 +0300
commit49dc06e1a3e47892dc93b6c3c9dcc3c7d892430e (patch)
tree3d9c3e38e8885bd5e84b83741e10d10abac24374 /apps/mobile/app/dashboard/(tabs)/index.tsx
parentb094b2cecb0da1bcdf4c63dd081638d87793c53c (diff)
downloadkarakeep-49dc06e1a3e47892dc93b6c3c9dcc3c7d892430e.tar.zst
ui(mobile): Merge the editors for notes and links
Diffstat (limited to 'apps/mobile/app/dashboard/(tabs)/index.tsx')
-rw-r--r--apps/mobile/app/dashboard/(tabs)/index.tsx17
1 files changed, 3 insertions, 14 deletions
diff --git a/apps/mobile/app/dashboard/(tabs)/index.tsx b/apps/mobile/app/dashboard/(tabs)/index.tsx
index 994ebb45..dc9871e7 100644
--- a/apps/mobile/app/dashboard/(tabs)/index.tsx
+++ b/apps/mobile/app/dashboard/(tabs)/index.tsx
@@ -2,7 +2,6 @@ import { useRef } from "react";
import { Platform, View } from "react-native";
import * as Haptics from "expo-haptics";
import * as ImagePicker from "expo-image-picker";
-import { useRouter } from "expo-router";
import NoteEditorModal from "@/components/bookmarks/NewBookmarkModal";
import UpdatingBookmarkList from "@/components/bookmarks/UpdatingBookmarkList";
import CustomSafeAreaView from "@/components/ui/CustomSafeAreaView";
@@ -20,7 +19,6 @@ function HeaderRight({
openNewBookmarkModal: () => void;
}) {
const { toast } = useToast();
- const router = useRouter();
const { settings } = useAppSettings();
const { uploadAsset } = useUploadAsset(settings, {
onError: (e) => {
@@ -31,10 +29,8 @@ function HeaderRight({
<MenuView
onPressAction={async ({ nativeEvent }) => {
Haptics.selectionAsync();
- if (nativeEvent.event === "note") {
+ if (nativeEvent.event === "new") {
openNewBookmarkModal();
- } else if (nativeEvent.event === "link") {
- router.navigate("dashboard/add-link");
} else if (nativeEvent.event === "library") {
const result = await ImagePicker.launchImageLibraryAsync({
mediaTypes: ImagePicker.MediaTypeOptions.Images,
@@ -52,15 +48,8 @@ function HeaderRight({
}}
actions={[
{
- id: "link",
- title: "New Link",
- image: Platform.select({
- ios: "link",
- }),
- },
- {
- id: "note",
- title: "New Note",
+ id: "new",
+ title: "New Bookmark",
image: Platform.select({
ios: "note.text",
}),