From 3b4b90861c0a08c248671c1db15e0b2fa8d3f3cb Mon Sep 17 00:00:00 2001 From: Anthony Cooper Date: Tue, 26 Aug 2025 13:23:08 -0400 Subject: [PATCH] need to commit to switch branch --- web/src/components/MemoActionMenu.tsx | 63 ++++++++++++--------------- 1 file changed, 29 insertions(+), 34 deletions(-) diff --git a/web/src/components/MemoActionMenu.tsx b/web/src/components/MemoActionMenu.tsx index 638f2e0f6..9131f9112 100644 --- a/web/src/components/MemoActionMenu.tsx +++ b/web/src/components/MemoActionMenu.tsx @@ -89,51 +89,46 @@ const MemoActionMenu = observer((props: Props) => { return; } }; - //() => Promise.resolve(42) + //() => Promise.resolve({}) const handleToggleMemoStatusClick = async () => { - //just review async in notes //changing the state - const state = memo.state === State.ARCHIVED - ? State.NORMAL - : State.ARCHIVED; + const state = memo.state === State.ARCHIVED ? State.NORMAL : State.ARCHIVED; //showing message depending on state - const message = memo.state === State.ARCHIVED - ? t("message.restored-successfully") - : t("message.archived-successfully"); + const message = memo.state === State.ARCHIVED ? t("message.restored-successfully") : t("message.archived-successfully"); try { await memoStore.updateMemo( { name: memo.name, - state + state, }, ["state"], ); - // Show toast with Undo button - toast.custom((tToast) => ( -
- {message} - -
- )); - + // Show toast with Undo button + //input is function that takes in the toast object we will work with and it will be used in the output of the higher order function + toast.custom((tToast) => ( +
+ {message} + +
+ )); } catch (error: any) { toast.error(error.details); console.error(error);