import React from 'react'; import TweenOne from 'rc-tween-one'; import OverPack from 'rc-scroll-anim/lib/ScrollOverPack'; import QueueAnim from 'rc-queue-anim'; import { Row, Col } from 'antd'; import { getChildrenToRender } from './utils'; import { isImg } from './utils'; class Footer extends React.Component { static defaultProps = { className: 'footer1', }; getLiChildren = (data) => data.map((item, i) => { const { title, childWrapper, ...itemProps } = item; return (

{typeof title.children === 'string' && title.children.match(isImg) ? ( img ) : ( title.children )}

{childWrapper.children.map(getChildrenToRender)}
); }); render() { const { ...props } = this.props; const { dataSource } = props; delete props.dataSource; delete props.isMobile; const childrenToRender = this.getLiChildren(dataSource.block.children); return (
{childrenToRender}
{dataSource.copyright.children}
); } } export default Footer;