aboutsummaryrefslogtreecommitdiffstats
path: root/apps/mobile/app/dashboard
diff options
context:
space:
mode:
Diffstat (limited to 'apps/mobile/app/dashboard')
-rw-r--r--apps/mobile/app/dashboard/tags/[slug].tsx31
1 files changed, 31 insertions, 0 deletions
diff --git a/apps/mobile/app/dashboard/tags/[slug].tsx b/apps/mobile/app/dashboard/tags/[slug].tsx
new file mode 100644
index 00000000..39d1a87d
--- /dev/null
+++ b/apps/mobile/app/dashboard/tags/[slug].tsx
@@ -0,0 +1,31 @@
+import { View } from "react-native";
+import { Stack, useLocalSearchParams } from "expo-router";
+import BookmarkList from "@/components/bookmarks/BookmarkList";
+import FullPageSpinner from "@/components/ui/FullPageSpinner";
+import { api } from "@/lib/trpc";
+
+export default function ListView() {
+ const { slug } = useLocalSearchParams();
+ if (typeof slug !== "string") {
+ throw new Error("Unexpected param type");
+ }
+
+ const { data: tag } = api.tags.get.useQuery({ tagId: slug });
+
+ return (
+ <>
+ <Stack.Screen
+ options={{
+ headerTitle: tag ? `${tag.name}` : "Loading ...",
+ }}
+ />
+ {tag ? (
+ <View>
+ <BookmarkList archived={false} ids={tag.bookmarks} />
+ </View>
+ ) : (
+ <FullPageSpinner />
+ )}
+ </>
+ );
+}