diff options
| author | MohamedBassem <me@mbassem.com> | 2024-03-13 02:43:57 +0000 |
|---|---|---|
| committer | MohamedBassem <me@mbassem.com> | 2024-03-13 02:43:57 +0000 |
| commit | be518d51eaf57a1f0e04b7608d9a4362a516eb85 (patch) | |
| tree | 26661e3383c495006720d212304556072ad8f006 /packages/mobile/app | |
| parent | f1d86812e9a045b474f4a1c8cd3621fe17b8b806 (diff) | |
| download | karakeep-be518d51eaf57a1f0e04b7608d9a4362a516eb85.tar.zst | |
mobile: All bookmarks homepage
Diffstat (limited to 'packages/mobile/app')
| -rw-r--r-- | packages/mobile/app/_layout.tsx | 2 | ||||
| -rw-r--r-- | packages/mobile/app/dashboard/(tabs)/_layout.tsx | 2 | ||||
| -rw-r--r-- | packages/mobile/app/dashboard/(tabs)/index.tsx | 5 | ||||
| -rw-r--r-- | packages/mobile/app/sharing.tsx | 4 |
4 files changed, 10 insertions, 3 deletions
diff --git a/packages/mobile/app/_layout.tsx b/packages/mobile/app/_layout.tsx index e8244867..063ad58e 100644 --- a/packages/mobile/app/_layout.tsx +++ b/packages/mobile/app/_layout.tsx @@ -2,11 +2,11 @@ import "@/globals.css"; import "expo-dev-client"; import { useRouter } from "expo-router"; +import { Stack } from "expo-router/stack"; import { useShareIntent } from "expo-share-intent"; import { StatusBar } from "expo-status-bar"; import { useEffect } from "react"; import { View } from "react-native"; -import { Stack } from "expo-router/stack"; import { Providers } from "@/lib/providers"; diff --git a/packages/mobile/app/dashboard/(tabs)/_layout.tsx b/packages/mobile/app/dashboard/(tabs)/_layout.tsx index 49d95b35..c15f37f1 100644 --- a/packages/mobile/app/dashboard/(tabs)/_layout.tsx +++ b/packages/mobile/app/dashboard/(tabs)/_layout.tsx @@ -1,6 +1,6 @@ -import React from "react"; import { Tabs } from "expo-router"; import { Home, Settings } from "lucide-react-native"; +import React from "react"; export default function TabLayout() { return ( diff --git a/packages/mobile/app/dashboard/(tabs)/index.tsx b/packages/mobile/app/dashboard/(tabs)/index.tsx index d043a9c4..28fa39de 100644 --- a/packages/mobile/app/dashboard/(tabs)/index.tsx +++ b/packages/mobile/app/dashboard/(tabs)/index.tsx @@ -1,8 +1,11 @@ import { View } from "react-native"; +import BookmarkList from "@/components/bookmarks/BookmarkList"; + export default function Home() { return ( - <View className="flex h-full items-center justify-center gap-4 px-4"> + <View> + <BookmarkList archived={false} /> </View> ); } diff --git a/packages/mobile/app/sharing.tsx b/packages/mobile/app/sharing.tsx index c9b6c0bb..89f1a168 100644 --- a/packages/mobile/app/sharing.tsx +++ b/packages/mobile/app/sharing.tsx @@ -22,9 +22,13 @@ function SaveBookmark({ setMode }: { setMode: (mode: Mode) => void }) { return null; }, [params]); + const invalidateAllBookmarks = + api.useUtils().bookmarks.getBookmarks.invalidate; + useEffect(() => { if (!isPending && shareIntent?.text) { mutate({ type: "link", url: shareIntent.text }); + invalidateAllBookmarks(); } }, []); |
