Skip to content

Commit

Permalink
website: add backToUp button.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Aug 29, 2022
1 parent db62101 commit 91a1a35
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 3 additions & 2 deletions website/package.json
Expand Up @@ -33,11 +33,12 @@
},
"dependencies": {
"@uiw/formatter": "~1.3.2",
"@uiw/react-back-to-top": "^1.2.0",
"@uiw/react-code-preview": "~4.0.5",
"@uiw/react-markdown-preview": "~3.5.0",
"@uiw/reset.css": "~1.0.5",
"react": "~17.0.2",
"react-dom": "~17.0.2",
"react": ">=16.9.0",
"react-dom": ">=16.9.0",
"react-router-dom": "~6.2.2",
"uiw": "^4.21.16"
},
Expand Down
2 changes: 2 additions & 0 deletions website/src/index.tsx
@@ -1,6 +1,7 @@
import React, { useReducer } from 'react';
import ReactDOM from 'react-dom';
import { useRoutes, HashRouter } from 'react-router-dom';
import BackToUp from '@uiw/react-back-to-top';
import '@uiw/reset.css';
import { routes } from './routers';
import './styles/index.less';
Expand All @@ -14,6 +15,7 @@ export const Provider = ({ children }: { children: React.ReactNode }) => {

ReactDOM.render(
<HashRouter>
<BackToUp style={{ zIndex: 9999 }}>Top</BackToUp>
<Provider>
<App />
</Provider>
Expand Down

0 comments on commit 91a1a35

Please sign in to comment.