From 511eeba44901cd2f4b5d9474fc98d3a84f691b74 Mon Sep 17 00:00:00 2001 From: thecodrr Date: Sun, 1 Nov 2020 10:00:31 +0500 Subject: [PATCH] fix: only last trashed item being visible in trash --- apps/web/src/common/list-profiles.js | 4 ++-- apps/web/src/views/trash.js | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/web/src/common/list-profiles.js b/apps/web/src/common/list-profiles.js index 1adab4ae4..f3c7804de 100644 --- a/apps/web/src/common/list-profiles.js +++ b/apps/web/src/common/list-profiles.js @@ -62,8 +62,8 @@ const TopicsProfile = createProfile( const TrashProfile = createProfile( (index, item) => , (item) => { - if (item.type === "note") return getNoteHeight(item); - else if (item.type === "notebook") return getNotebookHeight(item); + if (item.itemType === "note") return getNoteHeight(item); + else if (item.itemType === "notebook") return getNotebookHeight(item); }, Math.max(MAX_HEIGHTS.note, MAX_HEIGHTS.notebook) ); diff --git a/apps/web/src/views/trash.js b/apps/web/src/views/trash.js index 95f5ae292..bbffb5960 100644 --- a/apps/web/src/views/trash.js +++ b/apps/web/src/views/trash.js @@ -11,6 +11,7 @@ function Trash() { useEffect(() => store.refresh(), []); const items = useStore((store) => store.trash); const clearTrash = useStore((store) => store.clear); + console.log(items); return (