mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-06 02:00:46 +00:00
removed logs, added creator type to CardFooter
This commit is contained in:
1 parent
4cd834e04c
commit
7ec4e8108a
5 files changed
+6
-11
No files matched your search
@@ -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 &&
|
||||
|
||||
@@ -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
|
||||
}} />
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
})
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -29,7 +29,6 @@ export default function MediaTab() {
|
||||
);
|
||||
const [showMasonryGrid, setShowMasonryGrid] = useState(true);
|
||||
const [list, listSet] = useState<MediaFile[]>([]);
|
||||
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,
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user