/** * External dependencies */ import { isEmpty } from 'lodash' /** * WordPress dependencies */ import { RichText, useBlockProps } from '@wordpress/block-editor' /** * Save block for display on front * * @param {Object} props This component's props. */ export default ( props ) => { const { questions, titleWrapper } = props.attributes if ( isEmpty( questions ) ) { return null } return (
{ questions.map( ( question, index ) => { if ( isEmpty( question.title ) || isEmpty( question.content ) || false === question.visible ) { return null } return (
) } ) }
) }