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-01 02:14:19 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
08289cd8deb3d296c385100571aef4978331075b
08289cd8
1 parent
3e16896a
update CategoryContainer
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
10 deletions
front/src/Routes/Category/CategoryContainer.js
front/src/Routes/Category/CategoryContainer.js
View file @
08289cd
import
React
from
"react"
;
import
CategoryPresenter
from
"./CategoryPresenter"
;
import
{
withRouter
}
from
"react-router-dom"
;
import
{
useMutation
,
useQuery
}
from
"@apollo/react-hooks"
;
import
{
GET_CATEGORIRES
,
ADD_CATEGORY
,
EDIT_CATEGORY
,
DELETE_CATEGORY
,
}
from
"./CategoryQueries"
;
import
{
useQuery
}
from
"@apollo/react-hooks"
;
import
{
GET_CATEGORIRES
}
from
"./CategoryQueries"
;
export
default
withRouter
(({
location
})
=>
{
const
{
data
}
=
useQuery
(
GET_CATEGORIRES
);
const
[
addCategory
]
=
useMutation
(
ADD_CATEGORY
);
const
[
editCategory
]
=
useMutation
(
EDIT_CATEGORY
);
const
[
deleteCategory
]
=
useMutation
(
DELETE_CATEGORY
);
//
const [addCategory] = useMutation(ADD_CATEGORY);
//
const [editCategory] = useMutation(EDIT_CATEGORY);
//
const [deleteCategory] = useMutation(DELETE_CATEGORY);
let
categories
;
if
(
data
!==
undefined
)
{
...
...
Please
register
or
login
to post a comment