Skip to content

Commit

Permalink
fix: Pass location to RenderBlocks
Browse files Browse the repository at this point in the history
  • Loading branch information
kreafox committed Nov 20, 2023
1 parent b0ba5f9 commit 87ae0df
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/components/manage/Blocks/Group/DefaultBody.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Button } from 'semantic-ui-react';
import { BlocksForm, Icon, RenderBlocks } from '@plone/volto/components';
import EditBlockWrapper from './EditBlockWrapper';
import { useLocation } from 'react-router-dom';

import helpSVG from '@plone/volto/icons/help.svg';

Expand All @@ -21,6 +22,7 @@ const GroupBlockDefaultBody = (props) => {
formDescription,
isEditMode,
} = props;
const location = useLocation();
const metadata = props.metadata || props.properties;
const blockState = {};

Expand Down Expand Up @@ -98,7 +100,11 @@ const GroupBlockDefaultBody = (props) => {
)}
</BlocksForm>
) : (
<RenderBlocks metadata={metadata} content={data?.data || {}} />
<RenderBlocks
location={location}
metadata={metadata}
content={data?.data || {}}
/>
);
};

Expand Down

0 comments on commit 87ae0df

Please sign in to comment.