From 7ec4e8108a3785e3d40fbb620173cf8b2901dd07 Mon Sep 17 00:00:00 2001 From: Victor Date: Tue, 13 Feb 2024 21:25:47 -0800 Subject: [PATCH] removed logs, added creator type to CardFooter --- .../src/components/common/Card/AudioCard/AudioCard.tsx | 2 -- .../src/components/entities/CardFooter/CardFooter.tsx | 9 +++++---- .../src/hooks/useBatchContent/useBatchContent.tsx | 2 +- .../src/v2/view/pages/explore/tabs/MediaTab.tsx | 3 --- .../view/pages/profile/profile_view/tabs/WeightsTab.tsx | 1 - 5 files changed, 6 insertions(+), 11 deletions(-) diff --git a/packages/fakeyou.com/src/components/common/Card/AudioCard/AudioCard.tsx b/packages/fakeyou.com/src/components/common/Card/AudioCard/AudioCard.tsx index 476a5a96c6..dfcf6fe4bb 100644 --- a/packages/fakeyou.com/src/components/common/Card/AudioCard/AudioCard.tsx +++ b/packages/fakeyou.com/src/components/common/Card/AudioCard/AudioCard.tsx @@ -43,8 +43,6 @@ export default function AudioCard({ const linkUrl = getCardUrl(data, source, type); const history = useHistory(); - console.log("🟩", data); - const handleSelectModalResultSelect = () => { if (inSelectModal) { onResultSelect && diff --git a/packages/fakeyou.com/src/components/entities/CardFooter/CardFooter.tsx b/packages/fakeyou.com/src/components/entities/CardFooter/CardFooter.tsx index c06e3abbf7..1ef00a96ab 100644 --- a/packages/fakeyou.com/src/components/entities/CardFooter/CardFooter.tsx +++ b/packages/fakeyou.com/src/components/entities/CardFooter/CardFooter.tsx @@ -1,22 +1,23 @@ import React from "react"; import { MakeBatchProps } from "hooks/useBatchContent"; import { MakeRatingsProps } from "hooks/useRatings"; +import { UserDetailsLight } from "@storyteller/components/src/api/_common/UserDetailsLight"; import BookmarkButton from "components/common/BookmarkButton"; import LikeButton from "components/common/LikeButton"; import CreatorName from "components/common/Card/CreatorName"; import "./CardFooter.scss" interface CardFooterProps { - creator?: any, + creator?: UserDetailsLight, entityToken: string, entityType: string, makeBookmarksProps?: MakeBatchProps, - makeRatingsProps?: MakeRatingsProps, // this is MakeBatchProps extended include likeCount + makeRatingsProps?: MakeRatingsProps, // this is MakeBatchProps extended to include likeCount showCreator?: boolean } export default function CardFooter({ creator, entityToken, entityType, makeBookmarksProps, makeRatingsProps, showCreator }: CardFooterProps) { - const { default_avatar, display_name, gravatar_hash, username } = creator || {}; + const { default_avatar, display_name, gravatar_hash, username = "" } = creator || {}; const togglesOn = makeBookmarksProps || makeRatingsProps; const eitherOn = showCreator || togglesOn; return <> @@ -26,7 +27,7 @@ export default function CardFooter({ creator, entityToken, entityType, makeBookm avatarIndex: default_avatar?.image_index || 0, backgroundIndex: default_avatar?.color_index || 0, displayName: display_name || "Anonymous", - gravatarHash: gravatar_hash || null, + gravatarHash: gravatar_hash || "", noHeight: true, username }} /> diff --git a/packages/fakeyou.com/src/hooks/useBatchContent/useBatchContent.tsx b/packages/fakeyou.com/src/hooks/useBatchContent/useBatchContent.tsx index d46add91ca..b5ac6d8825 100644 --- a/packages/fakeyou.com/src/hooks/useBatchContent/useBatchContent.tsx +++ b/packages/fakeyou.com/src/hooks/useBatchContent/useBatchContent.tsx @@ -82,7 +82,7 @@ export default function useBatchContent({ 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/v2/view/pages/explore/tabs/MediaTab.tsx b/packages/fakeyou.com/src/v2/view/pages/explore/tabs/MediaTab.tsx index dd51d4e4f0..b38dd40b8d 100644 --- a/packages/fakeyou.com/src/v2/view/pages/explore/tabs/MediaTab.tsx +++ b/packages/fakeyou.com/src/v2/view/pages/explore/tabs/MediaTab.tsx @@ -29,7 +29,6 @@ export default function MediaTab() { ); const [showMasonryGrid, setShowMasonryGrid] = useState(true); const [list, listSet] = useState([]); - console.log("💙",list); const media = useLazyLists({ addQueries: { page_size: 24, @@ -43,10 +42,8 @@ export default function MediaTab() { listSet, onInputChange: () => setShowMasonryGrid(false), onSuccess: res => { - console.log("😎",res); ratings.gather({ res, expand: true, key: "token" }); // expand rather than replace for lazy loading bookmarks.gather({ res, expand: true, key: "token" }); // expand rather than replace for lazy loading - console.log("🩵",); setShowMasonryGrid(true); }, requestList: true, 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 15d51ea24d..6939178ce4 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 @@ -53,7 +53,6 @@ export default function WeightsTab({ username }: { username: string }) { listSet, onInputChange: () => setShowMasonryGrid(false), onSuccess: res => { - console.log("🧽",res); bookmarks.gather({ res, key: "weight_token" }); // expand rather than replace for lazy loading ratings.gather({ res, key: "weight_token" }); setShowMasonryGrid(true);