Browse Source

fix: fix react-jsx test error

chenshuai2144 4 years ago
parent
commit
f45c433c1d
2 changed files with 2 additions and 3 deletions
  1. 1 1
      src/components/GlobalHeader/NoticeIconView.tsx
  2. 1 2
      src/global.tsx

+ 1 - 1
src/components/GlobalHeader/NoticeIconView.tsx

@@ -1,4 +1,4 @@
-import React, { Component } from 'react';
+import { Component } from 'react';
 import type { ConnectProps } from 'umi';
 import { connect } from 'umi';
 import { Tag, message } from 'antd';

+ 1 - 2
src/global.tsx

@@ -1,6 +1,4 @@
 import { Button, message, notification } from 'antd';
-
-import React from 'react';
 import { useIntl } from 'umi';
 import defaultSettings from '../config/defaultSettings';
 
@@ -75,6 +73,7 @@ if (pwa) {
   });
 
   // remove all caches
+  // @ts-ignore
   if (window.caches && window.caches.keys) {
     caches.keys().then((keys) => {
       keys.forEach((key) => {