import React from 'react'; import classNames from 'classnames'; import ImagePreview from './ImagePreview'; import * as utils from '../utils'; function isPreviewImg(string) { return /^ 1; const previewClassName = classNames({ 'preview-image-boxes': true, clearfix: true, 'preview-image-boxes-with-popup': hasPopup, }); return ; } export default class Article extends React.Component { render() { const content = this.props.content; const jumper = content.description.filter((node) => { return node.type === 'h2'; }).map((node) => { return
  • { node.children }
  • ; }); content.description = content.description.map(imgToPreview); return (

    { content.meta.chinese || content.meta.english }

    { jumper.length > 0 ?
      { jumper }
    : null } { content.description.map(utils.objectToComponent) }
    ); } }