From 361eaaa2120f440c8da68f54ced0792c9bbf1ee4 Mon Sep 17 00:00:00 2001 From: Yash Date: Sat, 6 Apr 2024 12:19:07 +0000 Subject: fix memory modal closing --- apps/web/src/components/Sidebar/MemoriesBar.tsx | 115 +++++++++++++----------- 1 file changed, 61 insertions(+), 54 deletions(-) (limited to 'apps/web/src') diff --git a/apps/web/src/components/Sidebar/MemoriesBar.tsx b/apps/web/src/components/Sidebar/MemoriesBar.tsx index 95c6f095..290dd623 100644 --- a/apps/web/src/components/Sidebar/MemoriesBar.tsx +++ b/apps/web/src/components/Sidebar/MemoriesBar.tsx @@ -86,7 +86,10 @@ export function MemoriesBar() { - +
void }) { export function AddMemoryModal({ state, + onStateChange, }: { state: "page" | "note" | "space" | null; + onStateChange: (state: "page" | "note" | "space" | null) => void; }) { return ( <> - - - - Add a web page to memory - - This will take you the web page you are trying to add to memory, - where the extension will save the page to memory - - - - - - - Add - - - Cancel - - - - - - - - Add a web page to memory - - This will take you the web page you are trying to add to memory, - where the extension will save the page to memory - - - - - - - Add - - - Cancel - - - - - + onStateChange(open ? "page" : null)} + > + + + Add a web page to memory + + This will take you the web page you are trying to add to memory, + where the extension will save the page to memory + + + + + + + Add + + + Cancel + + + + + + + + Add a web page to memory + + This will take you the web page you are trying to add to memory, + where the extension will save the page to memory + + + + + + + Add + + + Cancel + + + + ); } -- cgit v1.2.3