feat(cardComponent): add support for displaying private indicator on CollectionCardComponent

feat(store): add 'private' property to storeComponent type to handle private components
This commit is contained in:
anovazzi1 2023-11-20 19:55:17 -03:00
commit 2cbf563b45
2 changed files with 8 additions and 0 deletions

View file

@ -144,6 +144,13 @@ export default function CollectionCardComponent({
</ShadTooltip>
{data?.metadata !== undefined && (
<div className="flex gap-3">
{data.private && (
<ShadTooltip content={data.private ? "Private" : "Public"}>
<span className="flex items-center gap-1.5 text-xs text-muted-foreground">
<IconComponent name="Lock" className="h-4 w-4" />
</span>
</ShadTooltip>
)}
{!data.is_component && (
<ShadTooltip content="Components">
<span className="flex items-center gap-1.5 text-xs text-muted-foreground">

View file

@ -10,6 +10,7 @@ export type storeComponent = {
liked_by_user?: boolean;
user_created?: { username: string };
last_tested_version?: string;
private?: boolean;
};
export type StoreComponentResponse = {