diff options
| author | Haishan <[email protected]> | 2020-01-15 13:07:08 +0800 |
|---|---|---|
| committer | Haishan <[email protected]> | 2020-02-06 16:25:07 +0800 |
| commit | 7a5cd76e1e1892313aa3b6199047c2f1bb83200c (patch) | |
| tree | a273bc4d983c6349e4b6917b24e54a70a4855435 /src/components/SideBar.js | |
| parent | 601f4893f9dd0bf01d0f4e85ebe9d0798985deda (diff) | |
build: ugprade deps
Diffstat (limited to 'src/components/SideBar.js')
| -rw-r--r-- | src/components/SideBar.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/components/SideBar.js b/src/components/SideBar.js index 2b68b85..9bee00e 100644 --- a/src/components/SideBar.js +++ b/src/components/SideBar.js @@ -1,7 +1,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import cx from 'classnames'; -import { Link } from 'react-router-dom'; +import { Link, useLocation } from 'react-router-dom'; import { Moon, Command, @@ -86,7 +86,8 @@ const pages = [ } ]; -function SideBar({ dispatch, location }) { +function SideBar({ dispatch }) { + const location = useLocation(); const switchThemeHooked = useCallback(() => { dispatch(switchTheme()); }, [dispatch]); |
