Skip to content

Commit

Permalink
fix: GalleryPreview
Browse files Browse the repository at this point in the history
  • Loading branch information
giuliaghisini committed Nov 6, 2023
1 parent bd2e4ab commit 29f0299
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const GalleryPreview = ({ id, viewIndex, setViewIndex, items }) => {
const image = items[viewIndex];

let checkUrlImage = image?.image_field
? image.image_scales?.[image.image_field]?.[0]?.scales?.larger?.download
? image?.image_scales?.[image?.image_field]?.[0]?.scales?.larger?.download
: image?.image?.scales?.larger?.download ||
image?.image_scales?.image[0]?.scales?.larger?.download;

Expand Down
8 changes: 0 additions & 8 deletions src/components/ItaliaTheme/View/ViewUtils.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,6 @@ export const useSideMenu = (content, documentBody) => {
}, [content.description, content.title, documentBody]);

//observer is needed for loadable blocks like listing and rss, if you want to use their title's for SideMenu
// useEffect(() => {
// const obs = updateSideMenuOnLoadingBlocks
// ? new MutationObserver((mutationList) => {
// setSideMenuElements(documentBody.current);
// })
// : null;
// setObserver(obs);
// }, [setObserver]);

useEffect(() => {
if (!updateSideMenuOnLoadingBlocks) return;
Expand Down

0 comments on commit 29f0299

Please sign in to comment.