import React from 'react'; import { FormattedMessage } from 'umi/locale'; import Link from 'umi/link'; import PageHeader from '@/components/PageHeader'; import { connect } from 'dva'; import GridContent from './GridContent'; import styles from './index.less'; import MenuContext from '@/layouts/MenuContext'; const PageHeaderWrapper = ({ children, contentWidth, wrapperClassName, top, ...restProps }) => (
{top} {value => ( } {...value} key="pageheader" {...restProps} linkElement={Link} itemRender={item => { if (item.locale) { return ; } return item.title; }} /> )} {children ? (
{children}
) : null}
); export default connect(({ setting }) => ({ contentWidth: setting.contentWidth, }))(PageHeaderWrapper);