fixed bookmark toggle on not displaying

This commit is contained in:
Victor committed 2024-01-11 22:11:32 -08:00
1 parent 65ffb62ba3
commit eb3e20bcbe
3 files changed
+6 -6

No files matched your search

@@ -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);
}
@@ -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
}
}
};
+1 -1
View File
@@ -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