diff --git a/__tests__/components/Sidebar.test.js b/__tests__/components/Sidebar.test.js
index d8636ae..76975bd 100644
--- a/__tests__/components/Sidebar.test.js
+++ b/__tests__/components/Sidebar.test.js
@@ -13,7 +13,7 @@ describe('', () => {
// $FlowFixMe
const { asFragment } = render(
-
+
,
);
diff --git a/app/components/sidebar.js b/app/components/sidebar.js
index 0acaf30..351e44d 100644
--- a/app/components/sidebar.js
+++ b/app/components/sidebar.js
@@ -2,7 +2,7 @@
import React, { type Element } from 'react';
import styled from 'styled-components';
-import { Link, withRouter, type Match } from 'react-router-dom';
+import { Link, type Location } from 'react-router-dom';
import { MENU_OPTIONS } from '../constants/sidebar';
import { ZCashLogo } from './zcash-logo';
@@ -48,16 +48,16 @@ type MenuItem = {
type Props = {
options?: MenuItem[],
- match: Match,
+ location: Location,
};
-const Sidebar = ({ options, match }: Props) => (
+export const SidebarComponent = ({ options, location }: Props) => (
{(options || []).map(item => (
-
+
{React.cloneElement(item.icon, {
style: { marginRight: '15px' },
size: 20,
@@ -68,8 +68,6 @@ const Sidebar = ({ options, match }: Props) => (
);
-export const SidebarComponent = withRouter(Sidebar);
-
-Sidebar.defaultProps = {
+SidebarComponent.defaultProps = {
options: MENU_OPTIONS,
};
diff --git a/app/router/router.js b/app/router/router.js
index 626c179..c50d910 100644
--- a/app/router/router.js
+++ b/app/router/router.js
@@ -1,7 +1,7 @@
// @flow
import React from 'react';
-import { Route, Switch } from 'react-router-dom';
+import { Route, Switch, type Location } from 'react-router-dom';
import styled from 'styled-components';
import { ScrollTopComponent } from './scroll-top';
@@ -24,9 +24,9 @@ const Wrapper = styled.div`
width: 100vw;
`;
-export const RouterComponent = () => (
+export const RouterComponent = ({ location }: { location: Location }) => (
-
+
{/* $FlowFixMe */}