From 92649b15cffd653459e8397e0e23b2c4be30a166 Mon Sep 17 00:00:00 2001 From: codetorso Date: Sat, 17 Aug 2024 00:43:36 +0530 Subject: [PATCH] better icons --- apps/web/app/(dash)/(memories)/content.tsx | 82 +++++++++++++--------- 1 file changed, 48 insertions(+), 34 deletions(-) diff --git a/apps/web/app/(dash)/(memories)/content.tsx b/apps/web/app/(dash)/(memories)/content.tsx index 5d81e823..651b628a 100644 --- a/apps/web/app/(dash)/(memories)/content.tsx +++ b/apps/web/app/(dash)/(memories)/content.tsx @@ -37,7 +37,22 @@ import { toast } from "sonner"; import { Input } from "@repo/ui/shadcn/input"; import { motion } from "framer-motion"; import { useSearchParams } from "next/navigation"; -import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger } from "@repo/ui/shadcn/alert-dialog"; +import { + AlertDialog, + AlertDialogAction, + AlertDialogCancel, + AlertDialogContent, + AlertDialogDescription, + AlertDialogFooter, + AlertDialogHeader, + AlertDialogTitle, + AlertDialogTrigger, +} from "@repo/ui/shadcn/alert-dialog"; +import { + BookOpenIcon, + DocumentTextIcon, + FolderIcon, +} from "@heroicons/react/24/outline"; type TMemoriesPage = { memoriesAndSpaces: { memories: Content[]; spaces: StoredSpace[] }; @@ -156,7 +171,6 @@ export function MemoriesPage({ {currentSpace && (
- {usersWithAccess && usersWithAccess.length > 0 && (
Users with access @@ -280,9 +294,9 @@ function SpaceComponent({ handleDeleteSpace: (id: number) => void; }) { return ( -
+
- Spaces icon Space + Space
@@ -290,12 +304,7 @@ function SpaceComponent({ href={`/space/${id}`} className="flex items-center justify-between w-full" > -
-
- {title.slice(0, 2).toUpperCase()}{id} -
-
-
+
{title}
{description}
@@ -303,9 +312,12 @@ function SpaceComponent({ Search icon
-
- - {handleDeleteSpace(id)}} /> +
+ { + handleDeleteSpace(id); + }} + />
@@ -344,7 +356,7 @@ function MemoryComponent({ {type === "page" ? ( <>
- Page + Page
{/* remove `<---chunkId: ${vector.id}\n${content}\n---->` pattern from title */}
@@ -357,7 +369,7 @@ function MemoryComponent({ ) : type === "note" ? ( <>
- Note + Note
{title.replace(/(<---chunkId: .*?\n.*?\n---->)/g, "")} @@ -454,26 +466,28 @@ function Filters({ ); } -function SpaceDeleteAlert({onClick}: {onClick: ()=> void}){ +function SpaceDeleteAlert({ onClick }: { onClick: () => void }) { return ( - - - - Are you absolutely sure? - - This is irreversible. This will delete the space and all memories inside it. - - - - Cancel - Delete - - - - ) + + {" "} + + + + + Are you absolutely sure? + + This is irreversible. This will delete the space and all memories + inside it. + + + + Cancel + Delete + + + + ); } -export default MemoriesPage; \ No newline at end of file +export default MemoriesPage;