From edaef0a27b53d3583c448dd38146f4413bbf0bfd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=B8=85?= Date: Sun, 19 Aug 2018 10:23:27 +0800 Subject: [PATCH] Remove redundant package references --- src/components/PageHeader/index.js | 7 ------- src/layouts/BasicLayout.js | 3 ++- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/components/PageHeader/index.js b/src/components/PageHeader/index.js index a8cfca28..a4b1777b 100644 --- a/src/components/PageHeader/index.js +++ b/src/components/PageHeader/index.js @@ -1,8 +1,6 @@ import React, { PureComponent, createElement } from 'react'; import pathToRegexp from 'path-to-regexp'; import { Breadcrumb, Tabs, Card } from 'antd'; -import memoizeOne from 'memoize-one'; -import deepEqual from 'lodash.isequal'; import classNames from 'classnames'; import styles from './index.less'; import { urlToList } from '../_utils/pathTools'; @@ -21,11 +19,6 @@ export const getBreadcrumb = (breadcrumbNameMap, url) => { }; export default class PageHeader extends PureComponent { - constructor(props) { - super(props); - this.conversionFromLocation = memoizeOne(this.conversionFromLocation, deepEqual); - } - state = { breadcrumb: null, }; diff --git a/src/layouts/BasicLayout.js b/src/layouts/BasicLayout.js index e2341045..44e86b17 100644 --- a/src/layouts/BasicLayout.js +++ b/src/layouts/BasicLayout.js @@ -1,6 +1,7 @@ import React from 'react'; import { Layout } from 'antd'; import DocumentTitle from 'react-document-title'; +import deepEqual from 'lodash.isequal'; import memoizeOne from 'memoize-one'; import { connect } from 'dva'; import { ContainerQuery } from 'react-container-query'; @@ -35,7 +36,7 @@ const getBreadcrumbNameMap = memoizeOne(meun => { }; mergeMeunAndRouter(meun); return routerMap; -}); +}, deepEqual); const query = { 'screen-xs': { -- GitLab