Files
discord-decomp/modules/icymi/native/ContentInventoryEntryRow.tsx
T
2026-11-01 12:12:55 +02:00

25 lines
1.2 KiB
TypeScript

// Metro module 15370 (f15371).
import RelationshipStore from "../../../stores/RelationshipStore";
import { useStateFromStores } from "../../../_bundle/Module589";
import { ContentInventoryEntryType } from "../../../_bundle/Module7909";
import GamingLikeEntryRow from "./content_inventory/GamingLikeEntryRow";
import CustomStatusEntryRow from "./content_inventory/CustomStatusEntryRow";
export default function ContentInventoryEntryRow(props) {
const { content, renderForScreenshot = false } = props;
let visible = props.visible;
if (useStateFromStores([RelationshipStore], () => RelationshipStore.isBlockedOrIgnored(content.author_id))) {
return null;
}
const content_type = content.content_type;
if (ContentInventoryEntryType.TOP_GAME !== content_type && ContentInventoryEntryType.PLAYED_GAME !== content_type) {
if (ContentInventoryEntryType.CUSTOM_STATUS === content_type) {
if (visible == null) {
visible = false;
}
return <CustomStatusEntryRow content={content} renderForScreenshot={renderForScreenshot} visible={visible} />;
}
return null;
}
return <GamingLikeEntryRow content={content} renderForScreenshot={renderForScreenshot} />;
};