From eb3e20bcbe45dd4298aaf85b338d0cb587a7a8a1 Mon Sep 17 00:00:00 2001 From: Victor Date: Thu, 11 Jan 2024 22:11:32 -0800 Subject: [PATCH] fixed bookmark toggle on not displaying --- .../src/hooks/useBatchContent/useBatchContent.tsx | 8 ++++---- .../fakeyou.com/src/hooks/useBookmarks/useBookmarks.tsx | 2 +- yarn.lock | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/fakeyou.com/src/hooks/useBatchContent/useBatchContent.tsx b/packages/fakeyou.com/src/hooks/useBatchContent/useBatchContent.tsx index 46b3e08d73..2c5ab48457 100644 --- a/packages/fakeyou.com/src/hooks/useBatchContent/useBatchContent.tsx +++ b/packages/fakeyou.com/src/hooks/useBatchContent/useBatchContent.tsx @@ -41,11 +41,11 @@ export default function useBatchContent({ busyListSet(tokens.reduce((obj = {},token = "") => ({ ...obj, [token]: true }),{})); // add current batch to busy list fetcher("",{},{ tokens }).then((batchRes: any) => { - console.log("🪙", res, modLibrary); + // console.log("🪙", res, modLibrary); if (batchRes.success && !!batchRes[resultsKey]) { -console.log("🥏",batchRes[resultsKey]); + // console.log("🥏",batchRes[resultsKey]); let newBatch = batchRes[resultsKey].reduce((obj = {}, { entity_token = "", ...current }) => { - console.log("🧲",current, res, entity_token, obj); + // console.log("🧲",current, res, entity_token, obj); let newCurrent = { ...obj, [entity_token]: { ...modLibrary(current, res, entity_token) } @@ -53,7 +53,7 @@ console.log("🥏",batchRes[resultsKey]); return newCurrent; },{}); - console.log("😡", newBatch); + // console.log("😡", newBatch); busyListSet({}); // this should be a for each key in tokens delete from busyList, but this is fine for now librarySet((library: any) => expand ? { ...library, ...newBatch } : newBatch); } diff --git a/packages/fakeyou.com/src/hooks/useBookmarks/useBookmarks.tsx b/packages/fakeyou.com/src/hooks/useBookmarks/useBookmarks.tsx index 1040b987fe..f61454df57 100644 --- a/packages/fakeyou.com/src/hooks/useBookmarks/useBookmarks.tsx +++ b/packages/fakeyou.com/src/hooks/useBookmarks/useBookmarks.tsx @@ -17,7 +17,7 @@ export default function useBookmarks() { [entity_token]: { entity_type, is_bookmarked: toBookmark, - maybe_bookmark_token: toBookmark ? res.maybe_bookmark_token : null + maybe_bookmark_token: toBookmark ? res.user_bookmark_token : null } } }; diff --git a/yarn.lock b/yarn.lock index a407bf868f..b020378727 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4436,6 +4436,7 @@ __metadata: "@types/infinite-scroll": ^4.0.3 "@types/jest": ^24.9.1 "@types/js-cookie": ^3.0.1 + "@types/lodash.debounce": ^4.0.9 "@types/masonry-layout": ^4.2.7 "@types/node": ^12.12.47 "@types/react": ^16.9.36 @@ -4587,7 +4588,6 @@ __metadata: resolution: "@storyteller/root@workspace:." dependencies: "@react-spring/types": ^9.7.3 - "@types/lodash.debounce": ^4.0.9 craco: ^0.0.3 cross-env: ^7.0.3 husky: ^8.0.3