diff --git a/apps/web/app/(dash)/menu.tsx b/apps/web/app/(dash)/menu.tsx
index c1173eb6..616ab058 100644
--- a/apps/web/app/(dash)/menu.tsx
+++ b/apps/web/app/(dash)/menu.tsx
@@ -111,36 +111,18 @@ function Menu() {
const handleSubmit = async (content?: string, spaces?: number[]) => {
setDialogOpen(false);
-
- toast.info("Creating memory...", {
- icon: ,
- duration: 7500,
- });
-
if (!content || content.length === 0) {
- toast.error("Content is required");
- return;
+ throw new Error("Content is required");
}
-
- console.log(spaces);
-
const cont = await createMemory({
content: content,
spaces: spaces ?? undefined,
});
-
setContent("");
setSelectedSpaces([]);
-
- if (cont.success) {
- toast.success("Memory created", {
- richColors: true,
- });
- } else {
- toast.error(`Memory creation failed: ${cont.error}`);
- }
+ return cont;
};
-
+
return (
<>
{/* Desktop Menu */}
@@ -193,8 +175,24 @@ function Menu() {