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-06-16 20:54:37 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
ce984f005658a55ed1841f0745d59dcae3bba8ef
ce984f00
1 parent
009dc94c
add useMutation
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
2 deletions
front/src/Routes/Category/CategoryContainer.js
front/src/Routes/Category/CategoryContainer.js
View file @
ce984f0
import
React
,
{
useEffect
,
useState
}
from
"react"
;
import
CategoryPresenter
from
"./CategoryPresenter"
;
import
{
withRouter
}
from
"react-router-dom"
;
import
{
useQuery
}
from
"@apollo/react-hooks"
;
import
{
useQuery
,
useMutation
}
from
"@apollo/react-hooks"
;
import
{
GET_CATEGORIRES
,
ADD_CATEGORY
,
...
...
@@ -16,7 +16,6 @@ export default withRouter(({ location }) => {
error
:
categoryQueryError
,
loading
:
categoryQueryLoading
,
}
=
useQuery
(
GET_CATEGORIRES
);
const
[
addCategory
]
=
useMutation
(
ADD_CATEGORY
);
let
categories
;
if
(
categoryList
!==
undefined
)
{
...
...
Please
register
or
login
to post a comment