diff options
| author | Dhravya <[email protected]> | 2024-04-13 09:14:37 -0700 |
|---|---|---|
| committer | Dhravya <[email protected]> | 2024-04-13 09:14:37 -0700 |
| commit | 75cae41f2aebd6343ce95cd0b6910870724ed374 (patch) | |
| tree | 44c9a92202801aea87cdaffd51bcd8b836fa69ea /apps/web/src/components/Sidebar/AddMemoryDialog.tsx | |
| parent | CloudflareAI for better streaming (diff) | |
| download | supermemory-75cae41f2aebd6343ce95cd0b6910870724ed374.tar.xz supermemory-75cae41f2aebd6343ce95cd0b6910870724ed374.zip | |
merge
Diffstat (limited to 'apps/web/src/components/Sidebar/AddMemoryDialog.tsx')
| -rw-r--r-- | apps/web/src/components/Sidebar/AddMemoryDialog.tsx | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/apps/web/src/components/Sidebar/AddMemoryDialog.tsx b/apps/web/src/components/Sidebar/AddMemoryDialog.tsx index 886507ff..08b9a750 100644 --- a/apps/web/src/components/Sidebar/AddMemoryDialog.tsx +++ b/apps/web/src/components/Sidebar/AddMemoryDialog.tsx @@ -153,37 +153,6 @@ export function NoteAddPage({ closeDialog }: { closeDialog: () => void }) { } 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(): 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 false; - } - 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 false; - } - return true; - } - return ( <div className="md:w-[40vw]"> <DialogHeader> |