sdy

remove withRouter

import React from "react";
import { withRouter } from "react-router-dom";
import { useMutation } from "@apollo/react-hooks";
import { gql } from "apollo-boost";
import MenuPresenter from "./MenuPresenter";
......@@ -10,15 +9,7 @@ const LOG_OUT = gql`
}
`;
export default withRouter(({ match, location, history, chName }) => {
export default () => {
const [logOut] = useMutation(LOG_OUT);
return (
<MenuPresenter
logOut={logOut}
match={match}
location={location}
history={history}
chName={chName}
/>
);
});
return <MenuPresenter logOut={logOut} />;
};
......
......@@ -124,8 +124,7 @@ const StyledLink = styled(Link)`
}};
`;
export default ({ logOut, match, location, history, chName }) => {
console.log(location.pathname);
export default ({ logOut }) => {
return (
<MenuBar>
<TitleBox>
......