fix: remove version match on web (#2023)
diff --git a/web/src/components/RightContent/index.tsx b/web/src/components/RightContent/index.tsx
index 0fcca01..f2c425f 100644
--- a/web/src/components/RightContent/index.tsx
+++ b/web/src/components/RightContent/index.tsx
@@ -23,10 +23,9 @@
*/
import { Tooltip, Tag, Space } from 'antd';
import { QuestionCircleOutlined } from '@ant-design/icons';
-import React, { useEffect } from 'react';
+import React from 'react';
import { useModel, SelectLang } from 'umi';
-import { fetchVersionMatch } from '@/services/tool';
import Avatar from './AvatarDropdown';
import styles from './index.less';
@@ -41,12 +40,6 @@
const GlobalHeaderRight: React.FC = () => {
const { initialState } = useModel('@@initialState');
- useEffect(() => {
- if (localStorage.getItem('token')) {
- fetchVersionMatch();
- }
- }, []);
-
if (!initialState || !initialState.settings) {
return null;
}
@@ -62,7 +55,7 @@
<Space className={className}>
<a href="https://apisix.apache.org/docs/apisix/getting-started" target="_blank">
<Tooltip title="Documentation">
- <span className={styles.action} >
+ <span className={styles.action}>
<QuestionCircleOutlined />
</span>
</Tooltip>
diff --git a/web/src/services/tool.ts b/web/src/services/tool.ts
deleted file mode 100644
index 6e9da03..0000000
--- a/web/src/services/tool.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-import { request } from 'umi';
-
-export const fetchVersionMatch = () => request<Res<any>>('/tool/version_match');