(null);
const [showMasonryGrid, setShowMasonryGrid] = useState(true);
@@ -119,32 +120,32 @@ export default function MediaTab() {
switch (data.media_type) {
case "audio":
card = (
-
+
);
break;
case "image":
card = (
-
+
);
break;
case "video":
card = (
-
+
);
break;
default:
diff --git a/packages/fakeyou.com/src/v2/view/pages/explore/tabs/WeightsTab.tsx b/packages/fakeyou.com/src/v2/view/pages/explore/tabs/WeightsTab.tsx
index 2697227ca7..08094f7fbe 100644
--- a/packages/fakeyou.com/src/v2/view/pages/explore/tabs/WeightsTab.tsx
+++ b/packages/fakeyou.com/src/v2/view/pages/explore/tabs/WeightsTab.tsx
@@ -14,9 +14,10 @@ import { ListWeights } from "@storyteller/components/src/api/weights/ListWeights
import { Weight } from "@storyteller/components/src/api/weights/GetWeight";
import InfiniteScroll from "react-infinite-scroll-component";
import { WeightCategory } from "@storyteller/components/src/api/_common/enums/WeightCategory";
-import { useLazyLists } from "hooks";
+import { useBookmarks, useLazyLists } from "hooks";
export default function WeightsTab() {
+ const bookmarks = useBookmarks();
const gridContainerRef = useRef
(null);
const [showMasonryGrid, setShowMasonryGrid] = useState(true);
const [list, listSet] = useState([]);
@@ -158,45 +159,45 @@ export default function WeightsTab() {
switch (data.weights_category) {
case WeightCategory.TTS:
card = (
-
+
);
break;
case WeightCategory.VC:
card = (
-
+
);
break;
case WeightCategory.ZS:
card = (
-
+
);
break;
case WeightCategory.SD:
card = (
-
+
);
break;
case WeightCategory.VOCODER:
diff --git a/packages/fakeyou.com/src/v2/view/pages/profile/profile_view/tabs/BookmarksTab.tsx b/packages/fakeyou.com/src/v2/view/pages/profile/profile_view/tabs/BookmarksTab.tsx
index bacdf67db9..a4b934bd86 100644
--- a/packages/fakeyou.com/src/v2/view/pages/profile/profile_view/tabs/BookmarksTab.tsx
+++ b/packages/fakeyou.com/src/v2/view/pages/profile/profile_view/tabs/BookmarksTab.tsx
@@ -11,14 +11,15 @@ import {
} from "@fortawesome/pro-solid-svg-icons";
import Pagination from "components/common/Pagination";
-import { useListContent } from "hooks";
+import { useBookmarks, useListContent } from "hooks";
import { GetBookmarksByUser } from "@storyteller/components/src/api/bookmarks/GetBookmarksByUser";
export default function BookmarksTab({ username }: { username: string }) {
+ const bookmarks = useBookmarks();
const gridContainerRef = useRef(null);
const [selectedFilter, setSelectedFilter] = useState("all");
const [list, listSet] = useState([]);
- const bookmarks = useListContent({
+ const { isLoading, list: dataList, page, pageChange, pageCount, status } = useListContent({
debug: "bookmarks tab",
fetcher: GetBookmarksByUser,
list,
@@ -29,13 +30,13 @@ export default function BookmarksTab({ username }: { username: string }) {
});
const handlePageClick = (selectedItem: { selected: number }) => {
- bookmarks.pageChange(selectedItem.selected);
+ pageChange(selectedItem.selected);
};
const paginationProps = {
onPageChange: handlePageClick,
- pageCount: bookmarks.pageCount,
- currentPage: bookmarks.page,
+ pageCount,
+ currentPage: page,
};
const filterOptions = [
@@ -117,7 +118,7 @@ export default function BookmarksTab({ username }: { username: string }) {
(null);
const [showMasonryGrid, setShowMasonryGrid] = useState(true);
@@ -117,13 +118,25 @@ export default function MediaTab({ username }: { username: string }) {
let card;
switch (data.media_type) {
case "audio":
- card =
;
+ card =
;
break;
case "image":
- card =
;
+ card =
;
break;
case "video":
- card =
;
+ card =
;
break;
default:
card =
Unsupported media type
;
diff --git a/packages/fakeyou.com/src/v2/view/pages/profile/profile_view/tabs/WeightsTab.tsx b/packages/fakeyou.com/src/v2/view/pages/profile/profile_view/tabs/WeightsTab.tsx
index 6b6608dc7e..e9b53ec588 100644
--- a/packages/fakeyou.com/src/v2/view/pages/profile/profile_view/tabs/WeightsTab.tsx
+++ b/packages/fakeyou.com/src/v2/view/pages/profile/profile_view/tabs/WeightsTab.tsx
@@ -7,7 +7,7 @@ import {
faFilter,
} from "@fortawesome/pro-solid-svg-icons";
import Pagination from "components/common/Pagination";
-import { useListContent } from "hooks";
+import { useBookmarks, useListContent } from "hooks";
import { GetWeightsByUser } from "@storyteller/components/src/api/weights/GetWeightsByUser";
import { TempSelect } from "components/common";
import { WeightCategory } from "@storyteller/components/src/api/_common/enums/WeightCategory";
@@ -29,6 +29,7 @@ export default function WeightsTab({ username }: { username: string }) {
const [vc, vcSet] = useState("all");
const [showMasonryGrid, setShowMasonryGrid] = useState(true);
const addSetters = { sdSet, ttsSet, vcSet };
+ const bookmarks = useBookmarks();
const [list, listSet] = useState
([]);
const weights = useListContent({
@@ -177,45 +178,45 @@ export default function WeightsTab({ username }: { username: string }) {
switch (data.weights_category) {
case WeightCategory.TTS:
card = (
-
+
);
break;
case WeightCategory.VC:
card = (
-
+
);
break;
case WeightCategory.ZS:
card = (
-
+
);
break;
case WeightCategory.SD:
card = (
-
+
);
break;
case WeightCategory.VOCODER: