Toggle navigation
Toggle navigation
This project
Loading...
Sign in
2020-1-capstone-design1
/
Triz_Project1
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
1
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
sdy
2020-05-22 14:46:07 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
0ada7a7aca289922108acdbeec2d8a5e15e5a5a5
0ada7a7a
1 parent
f7f4069d
remove withRouter
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
14 deletions
front/src/Routes/Menu/MenuContainer.js
front/src/Routes/Menu/MenuPresenter.js
front/src/Routes/Menu/MenuContainer.js
View file @
0ada7a7
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
}
/>
;
};
...
...
front/src/Routes/Menu/MenuPresenter.js
View file @
0ada7a7
...
...
@@ -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>
...
...
Please
register
or
login
to post a comment