Browse Source

🐛 fix: remove unuse code

pull/7522/head
chenshuai2144 6 years ago
parent
commit
9882eb5c22
  1. 3
      package.json
  2. 14
      src/models/global.ts

3
package.json

@ -57,7 +57,7 @@
"@ant-design/pro-descriptions": "^1.0.19",
"@ant-design/pro-form": "^1.0.2",
"@ant-design/pro-layout": "^6.4.19",
"@ant-design/pro-table": "^2.8.1",
"@ant-design/pro-table": "^2.9.5",
"@umijs/route-utils": "^1.0.33",
"antd": "^4.7.0",
"classnames": "^2.2.6",
@ -87,7 +87,6 @@
"@umijs/plugin-blocks": "^2.0.5",
"@umijs/preset-ant-design-pro": "^1.2.0",
"@umijs/preset-react": "^1.4.8",
"@umijs/preset-ui": "^2.0.9",
"@umijs/yorkie": "^2.0.3",
"carlo": "^0.9.46",
"chalk": "^4.0.0",

14
src/models/global.ts

@ -1,4 +1,4 @@
import { Subscription, Reducer, Effect } from 'umi';
import { Reducer, Effect } from 'umi';
import { NoticeIconData } from '@/components/NoticeIcon';
import { queryNotices } from '@/services/user';
@ -28,7 +28,6 @@ export interface GlobalModelType {
saveNotices: Reducer<GlobalModelState>;
saveClearedNotices: Reducer<GlobalModelState>;
};
subscriptions: { setup: Subscription };
}
const GlobalModel: GlobalModelType = {
@ -122,17 +121,6 @@ const GlobalModel: GlobalModelType = {
};
},
},
subscriptions: {
setup({ history }): void {
// Subscribe history(url) change, trigger `load` action if pathname is `/`
history.listen(({ pathname, search }): void => {
if (typeof window.ga !== 'undefined') {
window.ga('send', 'pageview', pathname + search);
}
});
},
},
};
export default GlobalModel;

Loading…
Cancel
Save