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/add-link.tsx4
-rw-r--r--apps/mobile/app/dashboard/add-note.tsx7
2 files changed, 9 insertions, 2 deletions
diff --git a/apps/mobile/app/dashboard/add-link.tsx b/apps/mobile/app/dashboard/add-link.tsx
index 5096a9e7..d9773fb4 100644
--- a/apps/mobile/app/dashboard/add-link.tsx
+++ b/apps/mobile/app/dashboard/add-link.tsx
@@ -6,6 +6,8 @@ import { Input } from "@/components/ui/Input";
import { useToast } from "@/components/ui/Toast";
import { api } from "@/lib/trpc";
+import { BookmarkTypes } from "@hoarder/shared/types/bookmarks";
+
export default function AddNote() {
const [text, setText] = useState("");
const [error, setError] = useState<string | undefined>();
@@ -54,7 +56,7 @@ export default function AddNote() {
autoFocus
/>
<Button
- onPress={() => mutate({ type: "link", url: text })}
+ onPress={() => mutate({ type: BookmarkTypes.LINK, url: text })}
label="Add Link"
/>
</View>
diff --git a/apps/mobile/app/dashboard/add-note.tsx b/apps/mobile/app/dashboard/add-note.tsx
index 40c97456..6b8f0fef 100644
--- a/apps/mobile/app/dashboard/add-note.tsx
+++ b/apps/mobile/app/dashboard/add-note.tsx
@@ -5,6 +5,8 @@ import { Button } from "@/components/ui/Button";
import { Input } from "@/components/ui/Input";
import { api } from "@/lib/trpc";
+import { BookmarkTypes } from "@hoarder/shared/types/bookmarks";
+
export default function AddNote() {
const [text, setText] = useState("");
const [error, setError] = useState<string | undefined>();
@@ -45,7 +47,10 @@ export default function AddNote() {
placeholder="What's on your mind?"
autoFocus
/>
- <Button onPress={() => mutate({ type: "text", text })} label="Add Note" />
+ <Button
+ onPress={() => mutate({ type: BookmarkTypes.TEXT, text })}
+ label="Add Note"
+ />
</View>
);
}