Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const DefaultView = ({ content, intl }) => {
const blocksFieldname = getBlocksFieldname(content);
const blocksLayoutFieldname = getBlocksLayoutFieldname(content);
return hasBlocksData(content) ? (
<div id="page-document">
{map(content[blocksLayoutFieldname].items, block => {
const Block =
blocks.blocksConfig[(content[blocksFieldname]?.[block]?.['@type'])]?.[
'view'
] || null;
return Block !== null ? (
) : (
<div></div></div>