This is an automated email from the ASF dual-hosted git repository.

dengliming pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shenyu-dashboard.git


The following commit(s) were added to refs/heads/master by this push:
     new 84164c50 Added global back to top button (#442)
84164c50 is described below

commit 84164c50abb6293d31a55dc23a2eb3e6829b31bd
Author: Kerwin Bryant <[email protected]>
AuthorDate: Fri Apr 5 19:27:19 2024 +0800

    Added global back to top button (#442)
---
 src/router.js                 | 3 ++-
 src/routes/Document/ApiDoc.js | 3 +--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/router.js b/src/router.js
index 01b5d264..35aaca69 100644
--- a/src/router.js
+++ b/src/router.js
@@ -17,7 +17,7 @@
 
 import React from "react";
 import { routerRedux, Route, Switch } from "dva/router";
-import { ConfigProvider } from "antd";
+import { ConfigProvider, BackTop } from "antd";
 import enUS from "antd/lib/locale-provider/en_US";
 import { getRouterData } from "./common/router";
 import AuthRoute from "./utils/AuthRoute";
@@ -41,6 +41,7 @@ function RouterConfig({ history, app }) {
           />
         </Switch>
       </ConnectedRouter>
+      <BackTop />
     </ConfigProvider>
   );
 }
diff --git a/src/routes/Document/ApiDoc.js b/src/routes/Document/ApiDoc.js
index bf1e0cbd..603114a5 100644
--- a/src/routes/Document/ApiDoc.js
+++ b/src/routes/Document/ApiDoc.js
@@ -17,7 +17,7 @@
 
 /* eslint-disable no-unused-expressions */
 /* eslint-disable react/jsx-no-constructed-context-values */
-import { Col, Row, Card, BackTop, Empty, message } from "antd";
+import { Col, Row, Card, Empty, message } from "antd";
 import React, { useEffect, useState } from "react";
 import {
   getApi,
@@ -194,7 +194,6 @@ function ApiDoc() {
           </Card>
         </Col>
       </Row>
-      <BackTop />
     </ApiContext.Provider>
   );
 }

Reply via email to