sdy

remove withRouter

1 import React from "react"; 1 import React from "react";
2 -import { withRouter } from "react-router-dom";
3 import { useMutation } from "@apollo/react-hooks"; 2 import { useMutation } from "@apollo/react-hooks";
4 import { gql } from "apollo-boost"; 3 import { gql } from "apollo-boost";
5 import MenuPresenter from "./MenuPresenter"; 4 import MenuPresenter from "./MenuPresenter";
...@@ -10,15 +9,7 @@ const LOG_OUT = gql` ...@@ -10,15 +9,7 @@ const LOG_OUT = gql`
10 } 9 }
11 `; 10 `;
12 11
13 -export default withRouter(({ match, location, history, chName }) => { 12 +export default () => {
14 const [logOut] = useMutation(LOG_OUT); 13 const [logOut] = useMutation(LOG_OUT);
15 - return ( 14 + return <MenuPresenter logOut={logOut} />;
16 - <MenuPresenter 15 +};
17 - logOut={logOut}
18 - match={match}
19 - location={location}
20 - history={history}
21 - chName={chName}
22 - />
23 - );
24 -});
......
...@@ -124,8 +124,7 @@ const StyledLink = styled(Link)` ...@@ -124,8 +124,7 @@ const StyledLink = styled(Link)`
124 }}; 124 }};
125 `; 125 `;
126 126
127 -export default ({ logOut, match, location, history, chName }) => { 127 +export default ({ logOut }) => {
128 - console.log(location.pathname);
129 return ( 128 return (
130 <MenuBar> 129 <MenuBar>
131 <TitleBox> 130 <TitleBox>
......