/* eslint-disable react/no-array-index-key */
import classnames from 'classnames';
import get from 'lodash/get';
import customizable from "../../../../utils/css/customizable.js";
import Node from '../Node';
const Content = function Content(props) {
  const {
    data,
    context
  } = props;
  if (!data) {
    return null;
  }
  const nodes = get(data, 'document.nodes');
  if (!nodes) {
    return null;
  }
  return <div className={classnames(customizable('RenderedContent'))}>
      {nodes.map((node, i) => <Node key={i} data={node} context={context} />)}
    </div>;
};
export default Content;