diff options
| author | Dhravya Shah <[email protected]> | 2024-08-06 11:20:29 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-08-06 11:20:29 -0700 |
| commit | 7fc39cd770e4b2f55c6fdae1fa02fe0a66a93f6d (patch) | |
| tree | 82e6a03099b50441c2fe9a9bf8e8ddf7afa293e5 /apps/web/app/(dash) | |
| parent | Merge pull request #219 from Deepakchowdavarapu/readme-issue (diff) | |
| parent | updated kv and queues (diff) | |
| download | supermemory-7fc39cd770e4b2f55c6fdae1fa02fe0a66a93f6d.tar.xz supermemory-7fc39cd770e4b2f55c6fdae1fa02fe0a66a93f6d.zip | |
Merge pull request #193 from supermemoryai/kush/be-queue
Kush/be queue
Diffstat (limited to 'apps/web/app/(dash)')
| -rw-r--r-- | apps/web/app/(dash)/(memories)/content.tsx | 2 | ||||
| -rw-r--r-- | apps/web/app/(dash)/(memories)/space/[spaceid]/page.tsx | 2 | ||||
| -rw-r--r-- | apps/web/app/(dash)/dialogContentContainer.tsx | 4 | ||||
| -rw-r--r-- | apps/web/app/(dash)/menu.tsx | 14 |
4 files changed, 12 insertions, 10 deletions
diff --git a/apps/web/app/(dash)/(memories)/content.tsx b/apps/web/app/(dash)/(memories)/content.tsx index 179b4ef2..6e2659cb 100644 --- a/apps/web/app/(dash)/(memories)/content.tsx +++ b/apps/web/app/(dash)/(memories)/content.tsx @@ -1,6 +1,6 @@ "use client"; -import { Content, StoredSpace } from "@/server/db/schema"; +import { Content, StoredSpace } from "@repo/db/schema"; import { MemoriesIcon, NextIcon, SearchIcon, UrlIcon } from "@repo/ui/icons"; import { ArrowLeftIcon, diff --git a/apps/web/app/(dash)/(memories)/space/[spaceid]/page.tsx b/apps/web/app/(dash)/(memories)/space/[spaceid]/page.tsx index ed1ea1cc..8ad9d9cc 100644 --- a/apps/web/app/(dash)/(memories)/space/[spaceid]/page.tsx +++ b/apps/web/app/(dash)/(memories)/space/[spaceid]/page.tsx @@ -3,7 +3,7 @@ import { redirect } from "next/navigation"; import MemoriesPage from "../../content"; import { db } from "@/server/db"; import { and, eq } from "drizzle-orm"; -import { spacesAccess } from "@/server/db/schema"; +import { spacesAccess } from "@repo/db/schema"; import { auth } from "@/server/auth"; async function Page({ params: { spaceid } }: { params: { spaceid: number } }) { diff --git a/apps/web/app/(dash)/dialogContentContainer.tsx b/apps/web/app/(dash)/dialogContentContainer.tsx index 4e8d81ef..1a11ac6d 100644 --- a/apps/web/app/(dash)/dialogContentContainer.tsx +++ b/apps/web/app/(dash)/dialogContentContainer.tsx @@ -1,4 +1,4 @@ -import { StoredSpace } from "@/server/db/schema"; +import { StoredSpace } from "@repo/db/schema"; import { useEffect, useMemo, useState } from "react"; import { createMemory, createSpace } from "../actions/doers"; import ComboboxWithCreate from "@repo/ui/shadcn/combobox"; @@ -76,7 +76,7 @@ export function DialogContentContainer({ setSelectedSpaces([]); if (cont.success) { - toast.success("Memory created", { + toast.success("Memory queued", { richColors: true, }); } else { diff --git a/apps/web/app/(dash)/menu.tsx b/apps/web/app/(dash)/menu.tsx index 7eac5a56..1c0ce1ee 100644 --- a/apps/web/app/(dash)/menu.tsx +++ b/apps/web/app/(dash)/menu.tsx @@ -28,7 +28,7 @@ import { getSpaces } from "../actions/fetchers"; import { HomeIcon } from "@heroicons/react/24/solid"; import { createMemory, createSpace } from "../actions/doers"; import ComboboxWithCreate from "@repo/ui/shadcn/combobox"; -import { StoredSpace } from "@/server/db/schema"; +import { StoredSpace } from "@repo/db/schema"; import useMeasure from "react-use-measure"; import { useKeyPress } from "@/lib/useKeyPress"; @@ -121,9 +121,14 @@ function Menu() { setContent(""); setSelectedSpaces([]); if (cont.success) { + toast.success("Memory queued", { + richColors: true, + }); + } else { + toast.error(`Memory creation failed: ${cont.error}`); + throw new Error(`Memory creation failed: ${cont.error}`); return cont; } - throw new Error(`Memory creation failed: ${cont.error}`); }; return ( @@ -275,10 +280,7 @@ function Menu() { ]); setSelectedSpaces((prev) => [...prev, creationTask.data!]); } else { - toast.error( - "Space creation failed: " + creationTask.error ?? - "Unknown error", - ); + toast.error("Space creation failed: " + creationTask.error); } }} placeholder="Select or create a new space." |