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:
parent
3432a07285
commit
2cbf563b45
2 changed files with 8 additions and 0 deletions
|
|
@ -144,6 +144,13 @@ export default function CollectionCardComponent({
|
||||||
</ShadTooltip>
|
</ShadTooltip>
|
||||||
{data?.metadata !== undefined && (
|
{data?.metadata !== undefined && (
|
||||||
<div className="flex gap-3">
|
<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 && (
|
{!data.is_component && (
|
||||||
<ShadTooltip content="Components">
|
<ShadTooltip content="Components">
|
||||||
<span className="flex items-center gap-1.5 text-xs text-muted-foreground">
|
<span className="flex items-center gap-1.5 text-xs text-muted-foreground">
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ export type storeComponent = {
|
||||||
liked_by_user?: boolean;
|
liked_by_user?: boolean;
|
||||||
user_created?: { username: string };
|
user_created?: { username: string };
|
||||||
last_tested_version?: string;
|
last_tested_version?: string;
|
||||||
|
private?: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type StoreComponentResponse = {
|
export type StoreComponentResponse = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue