Skip to content

Commit

Permalink
fix: image size in attachments
Browse files Browse the repository at this point in the history
  • Loading branch information
giuliaghisini committed Jan 29, 2024
1 parent 289c5b9 commit 696fce3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/components/ItaliaTheme/View/Commons/Attachment.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@ const messages = defineMessages({
});

const Attachment = ({ title, description, download_url, item = {} }) => {
console.log(item);
const intl = useIntl();
let _item = { ...item };
if (item['@type'] === 'File') {
_item = item.file;
}
if (item['@type'] === 'Image') {
_item = item.image;
}
return (
<Card
className="card card-teaser shadow p-4 mt-3 rounded attachment"
Expand All @@ -35,7 +37,7 @@ const Attachment = ({ title, description, download_url, item = {} }) => {
<UniversalLink
item={{
..._item,
['@id']: download_url,
'@id': download_url,
}}
title={title}
aria-label={title}
Expand Down
1 change: 0 additions & 1 deletion src/components/ItaliaTheme/View/Commons/Attachments.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ const Attachments = ({
{
'path.depth': 1,
sort_on: 'getObjPositionInParent',
metadata_fields: '_all',
fullobjects: 1,
b_size: 900,
},
Expand Down

0 comments on commit 696fce3

Please sign in to comment.