diff --git a/web/src/components/MemoActionMenu.tsx b/web/src/components/MemoActionMenu.tsx index b455dac9a..e5d6e0976 100644 --- a/web/src/components/MemoActionMenu.tsx +++ b/web/src/components/MemoActionMenu.tsx @@ -90,16 +90,10 @@ const MemoActionMenu = observer((props: Props) => { } }; - //async () => {} = () => Promise.resolve({}) - //await promiseFunc, this just waits for the promise to be fulfilled - //use async just so we can use await inside, dont care about returned Promise const handleToggleMemoStatusClick = async () => { - //changing the state 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"); try { - //must wait for this promise returned by updateMemo to be fulfileld before continuing await memoStore.updateMemo( { name: memo.name, @@ -108,44 +102,32 @@ const MemoActionMenu = observer((props: Props) => { ["state"], ); - //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, - ) => ( - //div container -