diff --git a/src/components/Library/LibraryItemsPreview.tsx b/src/components/Library/LibraryItemsPreview.tsx
index 392a3fc..85afd83 100644
--- a/src/components/Library/LibraryItemsPreview.tsx
+++ b/src/components/Library/LibraryItemsPreview.tsx
@@ -63,31 +63,30 @@ export default function LibraryItemsPreview(
))}
- {item.release_date ||
- (item.price && (
-
- {item.release_date && (
-
-
- event
-
- {prettyDate(item.release_date)}
-
- )}
- {item.price && props.currencies && (
-
-
- shopping_cart
-
- {prettyPrice(
- item.price,
- props.currencies,
- appLayout.currency
- )}
-
- )}
-
- ))}
+ {(item.release_date || item.price) && (
+
+ {item.release_date && (
+
+
+ event
+
+ {prettyDate(item.release_date)}
+
+ )}
+ {item.price && props.currencies && (
+
+
+ shopping_cart
+
+ {prettyPrice(
+ item.price,
+ props.currencies,
+ appLayout.currency
+ )}
+
+ )}
+
+ )}
diff --git a/src/graphql/operation.graphql b/src/graphql/operation.graphql
index 5ec508c..0d7a7be 100644
--- a/src/graphql/operation.graphql
+++ b/src/graphql/operation.graphql
@@ -363,6 +363,15 @@ query getLibraryItem($slug: String, $language_code: String) {
}
}
}
+ categories {
+ data {
+ id
+ attributes {
+ name
+ short
+ }
+ }
+ }
size {
width
height
@@ -532,6 +541,15 @@ query getLibraryItem($slug: String, $language_code: String) {
}
}
}
+ categories {
+ data {
+ id
+ attributes {
+ name
+ short
+ }
+ }
+ }
metadata {
__typename
... on ComponentMetadataBooks {
diff --git a/src/graphql/operations-types.ts b/src/graphql/operations-types.ts
index c9d8ee3..7735c06 100644
--- a/src/graphql/operations-types.ts
+++ b/src/graphql/operations-types.ts
@@ -522,6 +522,18 @@ export type GetLibraryItemQuery = {
};
};
};
+ categories: {
+ __typename: "CategoryRelationResponseCollection";
+ data: Array<{
+ __typename: "CategoryEntity";
+ id: string;
+ attributes: {
+ __typename: "Category";
+ name: string;
+ short: string;
+ };
+ }>;
+ };
size: {
__typename: "ComponentBasicsSize";
width: number;
@@ -738,6 +750,18 @@ export type GetLibraryItemQuery = {
};
};
};
+ categories: {
+ __typename: "CategoryRelationResponseCollection";
+ data: Array<{
+ __typename: "CategoryEntity";
+ id: string;
+ attributes: {
+ __typename: "Category";
+ name: string;
+ short: string;
+ };
+ }>;
+ };
metadata: Array<
| {
__typename: "ComponentMetadataAudio";
diff --git a/src/pages/library/[slug].tsx b/src/pages/library/[slug].tsx
index f4fdba3..d37c98a 100644
--- a/src/pages/library/[slug].tsx
+++ b/src/pages/library/[slug].tsx
@@ -216,6 +216,20 @@ export default function LibrarySlug(props: LibrarySlugProps): JSX.Element {
)}
+
+ {item.categories.data.length > 0 && (
+
+
{langui.categories}
+
+ {item.categories.data.map((category) => (
+
+ {category.attributes.short}
+
+ ))}
+
+
+ )}
+
{item.size && (
<>
{langui.size}