sdy

add withRouter

1 import React from "react"; 1 import React from "react";
2 +import { withRouter } from "react-router-dom";
2 import { useMutation } from "@apollo/react-hooks"; 3 import { useMutation } from "@apollo/react-hooks";
3 import { gql } from "apollo-boost"; 4 import { gql } from "apollo-boost";
4 import MenuPresenter from "./MenuPresenter"; 5 import MenuPresenter from "./MenuPresenter";
...@@ -9,8 +10,7 @@ const LOG_OUT = gql` ...@@ -9,8 +10,7 @@ const LOG_OUT = gql`
9 } 10 }
10 `; 11 `;
11 12
12 -export default () => { 13 +export default withRouter(() => {
13 const [logOut] = useMutation(LOG_OUT); 14 const [logOut] = useMutation(LOG_OUT);
14 -
15 return <MenuPresenter logOut={logOut} />; 15 return <MenuPresenter logOut={logOut} />;
16 -}; 16 +});
......