From e6fc9c42278d979b155fd71b1f8f13e72c990208 Mon Sep 17 00:00:00 2001
From: Yash <yashverma30115@gmail.com>
Date: Thu, 11 Apr 2024 01:34:49 +0000
Subject: ok

---
 .../web/src/components/Sidebar/AddMemoryDialog.tsx | 39 ++++++++++++++++++++++
 1 file changed, 39 insertions(+)
 create mode 100644 apps/web/src/components/Sidebar/AddMemoryDialog.tsx

(limited to 'apps/web/src/components/Sidebar/AddMemoryDialog.tsx')

diff --git a/apps/web/src/components/Sidebar/AddMemoryDialog.tsx b/apps/web/src/components/Sidebar/AddMemoryDialog.tsx
new file mode 100644
index 00000000..1bd4b688
--- /dev/null
+++ b/apps/web/src/components/Sidebar/AddMemoryDialog.tsx
@@ -0,0 +1,39 @@
+import { useEffect, useRef } from "react";
+import {
+  DialogClose,
+  DialogDescription,
+  DialogFooter,
+  DialogHeader,
+  DialogTitle,
+} from "../ui/dialog";
+import { Input } from "../ui/input";
+import { Label } from "../ui/label";
+
+export default function AddMemoryPage() {
+  return (
+    <>
+      <DialogHeader>
+        <DialogTitle>Add a web page to memory</DialogTitle>
+        <DialogDescription>
+          This will take you the web page you are trying to add to memory, where
+          the extension will save the page to memory
+        </DialogDescription>
+      </DialogHeader>
+      <Label className="mt-5">URL</Label>
+      <Input
+        placeholder="Enter the URL of the page"
+        type="url"
+        data-autofocus
+        className="bg-rgray-4 mt-2 w-full"
+      />
+      <DialogFooter>
+        <DialogClose className="bg-rgray-4 hover:bg-rgray-5 focus-visible:bg-rgray-5 focus-visible:ring-rgray-7 rounded-md px-4 py-2 ring-transparent transition focus-visible:outline-none focus-visible:ring-2">
+          Add
+        </DialogClose>
+        <DialogClose className="hover:bg-rgray-4 focus-visible:bg-rgray-4 focus-visible:ring-rgray-7 rounded-md px-3 py-2 ring-transparent transition focus-visible:outline-none focus-visible:ring-2">
+          Cancel
+        </DialogClose>
+      </DialogFooter>
+    </>
+  );
+}
-- 
cgit v1.2.3


From 4a90aaabf3fd41754b990f50ef4cbfa03723b0a8 Mon Sep 17 00:00:00 2001
From: Yash <yashverma30115@gmail.com>
Date: Thu, 11 Apr 2024 02:22:33 +0000
Subject: novel editor

---
 .../web/src/components/Sidebar/AddMemoryDialog.tsx | 31 +++++++++++++++++++---
 1 file changed, 28 insertions(+), 3 deletions(-)

(limited to 'apps/web/src/components/Sidebar/AddMemoryDialog.tsx')

diff --git a/apps/web/src/components/Sidebar/AddMemoryDialog.tsx b/apps/web/src/components/Sidebar/AddMemoryDialog.tsx
index 1bd4b688..5a1d92f0 100644
--- a/apps/web/src/components/Sidebar/AddMemoryDialog.tsx
+++ b/apps/web/src/components/Sidebar/AddMemoryDialog.tsx
@@ -1,4 +1,4 @@
-import { useEffect, useRef } from "react";
+import { Editor } from "novel";
 import {
   DialogClose,
   DialogDescription,
@@ -8,8 +8,9 @@ import {
 } from "../ui/dialog";
 import { Input } from "../ui/input";
 import { Label } from "../ui/label";
+import { useRef } from "react";
 
-export default function AddMemoryPage() {
+export function AddMemoryPage() {
   return (
     <>
       <DialogHeader>
@@ -23,7 +24,7 @@ export default function AddMemoryPage() {
       <Input
         placeholder="Enter the URL of the page"
         type="url"
-        data-autofocus
+        data-modal-autofocus
         className="bg-rgray-4 mt-2 w-full"
       />
       <DialogFooter>
@@ -37,3 +38,27 @@ export default function AddMemoryPage() {
     </>
   );
 }
+
+export function NoteAddPage() {
+  return (
+    <>
+      <Input
+        className="w-full border-none p-0 text-xl ring-0 placeholder:text-white/30 focus-visible:ring-0"
+        placeholder="Name of the note"
+        data-modal-autofocus
+      />
+      <Editor
+        disableLocalStorage
+        className="novel-editor bg-rgray-4 border-rgray-7 dark mt-5 max-h-[60vh] min-h-[40vh] w-[50vw] overflow-y-auto rounded-lg border [&>div>div]:p-5"
+      />
+      <DialogFooter>
+        <DialogClose className="bg-rgray-4 hover:bg-rgray-5 focus-visible:bg-rgray-5 focus-visible:ring-rgray-7 rounded-md px-4 py-2 ring-transparent transition focus-visible:outline-none focus-visible:ring-2">
+          Add
+        </DialogClose>
+        <DialogClose className="hover:bg-rgray-4 focus-visible:bg-rgray-4 focus-visible:ring-rgray-7 rounded-md px-3 py-2 ring-transparent transition focus-visible:outline-none focus-visible:ring-2">
+          Cancel
+        </DialogClose>
+      </DialogFooter>
+    </>
+  );
+}
-- 
cgit v1.2.3


From b425476cc495c561988a789eb9d94e3d947735be Mon Sep 17 00:00:00 2001
From: Yash <yashverma30115@gmail.com>
Date: Thu, 11 Apr 2024 05:57:42 +0000
Subject: notess

---
 .../web/src/components/Sidebar/AddMemoryDialog.tsx | 60 +++++++++++++++++++---
 1 file changed, 53 insertions(+), 7 deletions(-)

(limited to 'apps/web/src/components/Sidebar/AddMemoryDialog.tsx')

diff --git a/apps/web/src/components/Sidebar/AddMemoryDialog.tsx b/apps/web/src/components/Sidebar/AddMemoryDialog.tsx
index 5a1d92f0..784976b4 100644
--- a/apps/web/src/components/Sidebar/AddMemoryDialog.tsx
+++ b/apps/web/src/components/Sidebar/AddMemoryDialog.tsx
@@ -8,7 +8,8 @@ import {
 } from "../ui/dialog";
 import { Input } from "../ui/input";
 import { Label } from "../ui/label";
-import { useRef } from "react";
+import { Markdown } from "tiptap-markdown";
+import { useEffect, useRef, useState } from "react";
 
 export function AddMemoryPage() {
   return (
@@ -39,23 +40,68 @@ export function AddMemoryPage() {
   );
 }
 
-export function NoteAddPage() {
+export function NoteAddPage({ closeDialog }: { closeDialog: () => void }) {
+  const inputRef = useRef<HTMLInputElement>(null);
+  const [name, setName] = useState("");
+  const [content, setContent] = useState("");
+  const [loading, setLoading] = useState(false);
+
+  function check() {
+    const data = {
+      name: name.trim(),
+      content,
+    };
+    console.log(name);
+    if (!data.name || data.name.length < 1) {
+      if (!inputRef.current) {
+        alert("Please enter a name for the note");
+        return;
+      }
+      inputRef.current.value = "";
+      inputRef.current.placeholder = "Please enter a title for the note";
+      inputRef.current.dataset["error"] = "true";
+      setTimeout(() => {
+        inputRef.current!.placeholder = "Title of the note";
+        inputRef.current!.dataset["error"] = "false";
+      }, 500);
+      inputRef.current.focus();
+    }
+  }
+
   return (
     <>
       <Input
-        className="w-full border-none p-0 text-xl ring-0 placeholder:text-white/30 focus-visible:ring-0"
-        placeholder="Name of the note"
+        ref={inputRef}
+        data-error="false"
+        className="w-full border-none p-0 text-xl ring-0 placeholder:text-white/30 placeholder:transition placeholder:duration-200 focus-visible:ring-0 data-[error=true]:placeholder:text-red-400"
+        placeholder="Title of the note"
         data-modal-autofocus
+        value={name}
+        onChange={(e) => setName(e.target.value)}
       />
       <Editor
         disableLocalStorage
+        defaultValue={""}
+        onUpdate={(editor) => {
+          if (!editor) return;
+          setContent(editor.storage.markdown.getMarkdown());
+        }}
+        extensions={[Markdown]}
         className="novel-editor bg-rgray-4 border-rgray-7 dark mt-5 max-h-[60vh] min-h-[40vh] w-[50vw] overflow-y-auto rounded-lg border [&>div>div]:p-5"
       />
       <DialogFooter>
-        <DialogClose className="bg-rgray-4 hover:bg-rgray-5 focus-visible:bg-rgray-5 focus-visible:ring-rgray-7 rounded-md px-4 py-2 ring-transparent transition focus-visible:outline-none focus-visible:ring-2">
+        <button
+          onClick={() => {
+            check();
+          }}
+          className="bg-rgray-4 hover:bg-rgray-5 focus-visible:bg-rgray-5 focus-visible:ring-rgray-7 rounded-md px-4 py-2 ring-transparent transition focus-visible:outline-none focus-visible:ring-2"
+        >
           Add
-        </DialogClose>
-        <DialogClose className="hover:bg-rgray-4 focus-visible:bg-rgray-4 focus-visible:ring-rgray-7 rounded-md px-3 py-2 ring-transparent transition focus-visible:outline-none focus-visible:ring-2">
+        </button>
+        <DialogClose
+          type={undefined}
+          className="hover:bg-rgray-4 focus-visible:bg-rgray-4 focus-visible:ring-rgray-7 rounded-md px-3 py-2 ring-transparent transition focus-visible:outline-none focus-visible:ring-2"
+        >
           Cancel
         </DialogClose>
       </DialogFooter>
-- 
cgit v1.2.3


From 53c60283153b98b3b713d3163d208c9e14262b94 Mon Sep 17 00:00:00 2001
From: Yash <yashverma30115@gmail.com>
Date: Thu, 11 Apr 2024 06:20:22 +0000
Subject: add modal

---
 .../web/src/components/Sidebar/AddMemoryDialog.tsx | 32 ++++++++++++++++++----
 1 file changed, 26 insertions(+), 6 deletions(-)

(limited to 'apps/web/src/components/Sidebar/AddMemoryDialog.tsx')

diff --git a/apps/web/src/components/Sidebar/AddMemoryDialog.tsx b/apps/web/src/components/Sidebar/AddMemoryDialog.tsx
index 784976b4..ace930a6 100644
--- a/apps/web/src/components/Sidebar/AddMemoryDialog.tsx
+++ b/apps/web/src/components/Sidebar/AddMemoryDialog.tsx
@@ -10,10 +10,13 @@ import { Input } from "../ui/input";
 import { Label } from "../ui/label";
 import { Markdown } from "tiptap-markdown";
 import { useEffect, useRef, useState } from "react";
+import { FilterCombobox } from "./FilterCombobox";
 
 export function AddMemoryPage() {
+  const [selectedSpacesId, setSelectedSpacesId] = useState<number[]>([]);
+
   return (
-    <>
+    <div className="md:w-[40vw]">
       <DialogHeader>
         <DialogTitle>Add a web page to memory</DialogTitle>
         <DialogDescription>
@@ -21,7 +24,7 @@ export function AddMemoryPage() {
           the extension will save the page to memory
         </DialogDescription>
       </DialogHeader>
-      <Label className="mt-5">URL</Label>
+      <Label className="mt-5 block">URL</Label>
       <Input
         placeholder="Enter the URL of the page"
         type="url"
@@ -29,18 +32,29 @@ export function AddMemoryPage() {
         className="bg-rgray-4 mt-2 w-full"
       />
       <DialogFooter>
-        <DialogClose className="bg-rgray-4 hover:bg-rgray-5 focus-visible:bg-rgray-5 focus-visible:ring-rgray-7 rounded-md px-4 py-2 ring-transparent transition focus-visible:outline-none focus-visible:ring-2">
+        <FilterCombobox
+          selectedSpaces={selectedSpacesId}
+          setSelectedSpaces={setSelectedSpacesId}
+          className="hover:bg-rgray-5 mr-auto bg-white/5"
+          name={"Spaces"}
+        />
+        <DialogClose
+          type={undefined}
+          className="bg-rgray-4 hover:bg-rgray-5 focus-visible:bg-rgray-5 focus-visible:ring-rgray-7 rounded-md px-4 py-2 ring-transparent transition focus-visible:outline-none focus-visible:ring-2"
+        >
           Add
         </DialogClose>
         <DialogClose className="hover:bg-rgray-4 focus-visible:bg-rgray-4 focus-visible:ring-rgray-7 rounded-md px-3 py-2 ring-transparent transition focus-visible:outline-none focus-visible:ring-2">
           Cancel
         </DialogClose>
       </DialogFooter>
-    </>
+    </div>
   );
 }
 
 export function NoteAddPage({ closeDialog }: { closeDialog: () => void }) {
+  const [selectedSpacesId, setSelectedSpacesId] = useState<number[]>([]);
+
   const inputRef = useRef<HTMLInputElement>(null);
   const [name, setName] = useState("");
   const [content, setContent] = useState("");
@@ -69,7 +83,7 @@ export function NoteAddPage({ closeDialog }: { closeDialog: () => void }) {
   }
 
   return (
-    <>
+    <div>
       <Input
         ref={inputRef}
         data-error="false"
@@ -90,6 +104,12 @@ export function NoteAddPage({ closeDialog }: { closeDialog: () => void }) {
         className="novel-editor bg-rgray-4 border-rgray-7 dark mt-5 max-h-[60vh] min-h-[40vh] w-[50vw] overflow-y-auto rounded-lg border [&>div>div]:p-5"
       />
       <DialogFooter>
+        <FilterCombobox
+          selectedSpaces={selectedSpacesId}
+          setSelectedSpaces={setSelectedSpacesId}
+          className="hover:bg-rgray-5 mr-auto bg-white/5"
+          name={"Spaces"}
+        />
         <button
           onClick={() => {
             check();
@@ -105,6 +125,6 @@ export function NoteAddPage({ closeDialog }: { closeDialog: () => void }) {
           Cancel
         </DialogClose>
       </DialogFooter>
-    </>
+    </div>
   );
 }
-- 
cgit v1.2.3


From 257e355ae3b47e9de37f9686b400fa598904c6cb Mon Sep 17 00:00:00 2001
From: Yash <yashverma30115@gmail.com>
Date: Thu, 11 Apr 2024 06:24:56 +0000
Subject: new schema

---
 .../web/src/components/Sidebar/AddMemoryDialog.tsx | 77 ++++++++++++++++++++++
 1 file changed, 77 insertions(+)

(limited to 'apps/web/src/components/Sidebar/AddMemoryDialog.tsx')

diff --git a/apps/web/src/components/Sidebar/AddMemoryDialog.tsx b/apps/web/src/components/Sidebar/AddMemoryDialog.tsx
index ace930a6..aa86966f 100644
--- a/apps/web/src/components/Sidebar/AddMemoryDialog.tsx
+++ b/apps/web/src/components/Sidebar/AddMemoryDialog.tsx
@@ -128,3 +128,80 @@ export function NoteAddPage({ closeDialog }: { closeDialog: () => void }) {
     </div>
   );
 }
+
+export function SpaceAddPage({ closeDialog }: { closeDialog: () => void }) {
+  const [selectedSpacesId, setSelectedSpacesId] = useState<number[]>([]);
+
+  const inputRef = useRef<HTMLInputElement>(null);
+  const [name, setName] = useState("");
+  const [content, setContent] = useState("");
+  const [loading, setLoading] = useState(false);
+
+  function check() {
+    const data = {
+      name: name.trim(),
+      content,
+    };
+    console.log(name);
+    if (!data.name || data.name.length < 1) {
+      if (!inputRef.current) {
+        alert("Please enter a name for the note");
+        return;
+      }
+      inputRef.current.value = "";
+      inputRef.current.placeholder = "Please enter a title for the note";
+      inputRef.current.dataset["error"] = "true";
+      setTimeout(() => {
+        inputRef.current!.placeholder = "Title of the note";
+        inputRef.current!.dataset["error"] = "false";
+      }, 500);
+      inputRef.current.focus();
+    }
+  }
+
+  return (
+    <div>
+      <Input
+        ref={inputRef}
+        data-error="false"
+        className="w-full border-none p-0 text-xl ring-0 placeholder:text-white/30 placeholder:transition placeholder:duration-200 focus-visible:ring-0 data-[error=true]:placeholder:text-red-400"
+        placeholder="Title of the note"
+        data-modal-autofocus
+        value={name}
+        onChange={(e) => setName(e.target.value)}
+      />
+      <Editor
+        disableLocalStorage
+        defaultValue={""}
+        onUpdate={(editor) => {
+          if (!editor) return;
+          setContent(editor.storage.markdown.getMarkdown());
+        }}
+        extensions={[Markdown]}
+        className="novel-editor bg-rgray-4 border-rgray-7 dark mt-5 max-h-[60vh] min-h-[40vh] w-[50vw] overflow-y-auto rounded-lg border [&>div>div]:p-5"
+      />
+      <DialogFooter>
+        <FilterCombobox
+          selectedSpaces={selectedSpacesId}
+          setSelectedSpaces={setSelectedSpacesId}
+          className="hover:bg-rgray-5 mr-auto bg-white/5"
+          name={"Spaces"}
+        />
+        <button
+          onClick={() => {
+            check();
+          }}
+          className="bg-rgray-4 hover:bg-rgray-5 focus-visible:bg-rgray-5 focus-visible:ring-rgray-7 rounded-md px-4 py-2 ring-transparent transition focus-visible:outline-none focus-visible:ring-2"
+        >
+          Add
+        </button>
+        <DialogClose
+          type={undefined}
+          className="hover:bg-rgray-4 focus-visible:bg-rgray-4 focus-visible:ring-rgray-7 rounded-md px-3 py-2 ring-transparent transition focus-visible:outline-none focus-visible:ring-2"
+        >
+          Cancel
+        </DialogClose>
+      </DialogFooter>
+    </div>
+  );
+}
-- 
cgit v1.2.3


From bf99ee97f7c4d7580829d074816ebe0d32316d92 Mon Sep 17 00:00:00 2001
From: Yash <yashverma30115@gmail.com>
Date: Thu, 11 Apr 2024 11:02:24 +0000
Subject: ok

---
 .../web/src/components/Sidebar/AddMemoryDialog.tsx | 100 +++++++++++----------
 1 file changed, 53 insertions(+), 47 deletions(-)

(limited to 'apps/web/src/components/Sidebar/AddMemoryDialog.tsx')

diff --git a/apps/web/src/components/Sidebar/AddMemoryDialog.tsx b/apps/web/src/components/Sidebar/AddMemoryDialog.tsx
index aa86966f..886507ff 100644
--- a/apps/web/src/components/Sidebar/AddMemoryDialog.tsx
+++ b/apps/web/src/components/Sidebar/AddMemoryDialog.tsx
@@ -10,13 +10,17 @@ import { Input } from "../ui/input";
 import { Label } from "../ui/label";
 import { Markdown } from "tiptap-markdown";
 import { useEffect, useRef, useState } from "react";
-import { FilterCombobox } from "./FilterCombobox";
+import { FilterSpaces } from "./FilterCombobox";
+import { useMemory } from "@/contexts/MemoryContext";
 
 export function AddMemoryPage() {
+  const { addMemory } = useMemory();
+
+  const [url, setUrl] = useState("");
   const [selectedSpacesId, setSelectedSpacesId] = useState<number[]>([]);
 
   return (
-    <div className="md:w-[40vw]">
+    <form className="md:w-[40vw]">
       <DialogHeader>
         <DialogTitle>Add a web page to memory</DialogTitle>
         <DialogDescription>
@@ -30,25 +34,41 @@ export function AddMemoryPage() {
         type="url"
         data-modal-autofocus
         className="bg-rgray-4 mt-2 w-full"
+        value={url}
+        onChange={(e) => setUrl(e.target.value)}
       />
       <DialogFooter>
-        <FilterCombobox
+        <FilterSpaces
           selectedSpaces={selectedSpacesId}
           setSelectedSpaces={setSelectedSpacesId}
           className="hover:bg-rgray-5 mr-auto bg-white/5"
           name={"Spaces"}
         />
-        <DialogClose
-          type={undefined}
+        <button
+          type={"submit"}
+          onClick={async () => {
+            // @Dhravya this is adding a memory with insufficient information fix pls
+            await addMemory(
+              {
+                title: url,
+                content: "",
+                type: "page",
+                url: url,
+                image: "/icons/logo_without_bg.png",
+                savedAt: new Date(),
+              },
+              selectedSpacesId,
+            );
+          }}
           className="bg-rgray-4 hover:bg-rgray-5 focus-visible:bg-rgray-5 focus-visible:ring-rgray-7 rounded-md px-4 py-2 ring-transparent transition focus-visible:outline-none focus-visible:ring-2"
         >
           Add
-        </DialogClose>
+        </button>
         <DialogClose className="hover:bg-rgray-4 focus-visible:bg-rgray-4 focus-visible:ring-rgray-7 rounded-md px-3 py-2 ring-transparent transition focus-visible:outline-none focus-visible:ring-2">
           Cancel
         </DialogClose>
       </DialogFooter>
-    </div>
+    </form>
   );
 }
 
@@ -60,16 +80,15 @@ export function NoteAddPage({ closeDialog }: { closeDialog: () => void }) {
   const [content, setContent] = useState("");
   const [loading, setLoading] = useState(false);
 
-  function check() {
+  function check(): boolean {
     const data = {
       name: name.trim(),
       content,
     };
-    console.log(name);
     if (!data.name || data.name.length < 1) {
       if (!inputRef.current) {
         alert("Please enter a name for the note");
-        return;
+        return false;
       }
       inputRef.current.value = "";
       inputRef.current.placeholder = "Please enter a title for the note";
@@ -79,7 +98,9 @@ export function NoteAddPage({ closeDialog }: { closeDialog: () => void }) {
         inputRef.current!.dataset["error"] = "false";
       }, 500);
       inputRef.current.focus();
+      return false;
     }
+    return true;
   }
 
   return (
@@ -87,7 +108,7 @@ export function NoteAddPage({ closeDialog }: { closeDialog: () => void }) {
       <Input
         ref={inputRef}
         data-error="false"
-        className="w-full border-none p-0 text-xl ring-0 placeholder:text-white/30 placeholder:transition placeholder:duration-200 focus-visible:ring-0 data-[error=true]:placeholder:text-red-400"
+        className="w-full border-none p-0 text-xl ring-0 placeholder:text-white/30 placeholder:transition placeholder:duration-500 focus-visible:ring-0 data-[error=true]:placeholder:text-red-400"
         placeholder="Title of the note"
         data-modal-autofocus
         value={name}
@@ -104,7 +125,7 @@ export function NoteAddPage({ closeDialog }: { closeDialog: () => void }) {
         className="novel-editor bg-rgray-4 border-rgray-7 dark mt-5 max-h-[60vh] min-h-[40vh] w-[50vw] overflow-y-auto rounded-lg border [&>div>div]:p-5"
       />
       <DialogFooter>
-        <FilterCombobox
+        <FilterSpaces
           selectedSpaces={selectedSpacesId}
           setSelectedSpaces={setSelectedSpacesId}
           className="hover:bg-rgray-5 mr-auto bg-white/5"
@@ -112,7 +133,9 @@ export function NoteAddPage({ closeDialog }: { closeDialog: () => void }) {
         />
         <button
           onClick={() => {
-            check();
+            if (check()) {
+              closeDialog();
+            }
           }}
           className="bg-rgray-4 hover:bg-rgray-5 focus-visible:bg-rgray-5 focus-visible:ring-rgray-7 rounded-md px-4 py-2 ring-transparent transition focus-visible:outline-none focus-visible:ring-2"
         >
@@ -137,7 +160,7 @@ export function SpaceAddPage({ closeDialog }: { closeDialog: () => void }) {
   const [content, setContent] = useState("");
   const [loading, setLoading] = useState(false);
 
-  function check() {
+  function check(): boolean {
     const data = {
       name: name.trim(),
       content,
@@ -146,7 +169,7 @@ export function SpaceAddPage({ closeDialog }: { closeDialog: () => void }) {
     if (!data.name || data.name.length < 1) {
       if (!inputRef.current) {
         alert("Please enter a name for the note");
-        return;
+        return false;
       }
       inputRef.current.value = "";
       inputRef.current.placeholder = "Please enter a title for the note";
@@ -156,49 +179,32 @@ export function SpaceAddPage({ closeDialog }: { closeDialog: () => void }) {
         inputRef.current!.dataset["error"] = "false";
       }, 500);
       inputRef.current.focus();
+      return false;
     }
+    return true;
   }
 
   return (
-    <div>
+    <div className="md:w-[40vw]">
+      <DialogHeader>
+        <DialogTitle>Add a space</DialogTitle>
+      </DialogHeader>
+      <Label className="mt-5 block">Name</Label>
       <Input
-        ref={inputRef}
-        data-error="false"
-        className="w-full border-none p-0 text-xl ring-0 placeholder:text-white/30 placeholder:transition placeholder:duration-200 focus-visible:ring-0 data-[error=true]:placeholder:text-red-400"
-        placeholder="Title of the note"
+        placeholder="Enter the name of the space"
+        type="url"
         data-modal-autofocus
-        value={name}
-        onChange={(e) => setName(e.target.value)}
-      />
-      <Editor
-        disableLocalStorage
-        defaultValue={""}
-        onUpdate={(editor) => {
-          if (!editor) return;
-          setContent(editor.storage.markdown.getMarkdown());
-        }}
-        extensions={[Markdown]}
-        className="novel-editor bg-rgray-4 border-rgray-7 dark mt-5 max-h-[60vh] min-h-[40vh] w-[50vw] overflow-y-auto rounded-lg border [&>div>div]:p-5"
+        className="bg-rgray-4 mt-2 w-full"
       />
+      <Label className="mt-5 block">Memories</Label>
       <DialogFooter>
-        <FilterCombobox
-          selectedSpaces={selectedSpacesId}
-          setSelectedSpaces={setSelectedSpacesId}
-          className="hover:bg-rgray-5 mr-auto bg-white/5"
-          name={"Spaces"}
-        />
-        <button
-          onClick={() => {
-            check();
-          }}
-          className="bg-rgray-4 hover:bg-rgray-5 focus-visible:bg-rgray-5 focus-visible:ring-rgray-7 rounded-md px-4 py-2 ring-transparent transition focus-visible:outline-none focus-visible:ring-2"
-        >
-          Add
-        </button>
         <DialogClose
           type={undefined}
-          className="hover:bg-rgray-4 focus-visible:bg-rgray-4 focus-visible:ring-rgray-7 rounded-md px-3 py-2 ring-transparent transition focus-visible:outline-none focus-visible:ring-2"
+          className="bg-rgray-4 hover:bg-rgray-5 focus-visible:bg-rgray-5 focus-visible:ring-rgray-7 rounded-md px-4 py-2 ring-transparent transition focus-visible:outline-none focus-visible:ring-2"
         >
+          Add
+        </DialogClose>
+        <DialogClose className="hover:bg-rgray-4 focus-visible:bg-rgray-4 focus-visible:ring-rgray-7 rounded-md px-3 py-2 ring-transparent transition focus-visible:outline-none focus-visible:ring-2">
           Cancel
         </DialogClose>
       </DialogFooter>
-- 
cgit v1.2.3

