sdy

update CategoryContainer

1 import React from "react"; 1 import React from "react";
2 import CategoryPresenter from "./CategoryPresenter"; 2 import CategoryPresenter from "./CategoryPresenter";
3 import { withRouter } from "react-router-dom"; 3 import { withRouter } from "react-router-dom";
4 -import { useMutation, useQuery } from "@apollo/react-hooks"; 4 +import { useQuery } from "@apollo/react-hooks";
5 -import { 5 +import { GET_CATEGORIRES } from "./CategoryQueries";
6 - GET_CATEGORIRES,
7 - ADD_CATEGORY,
8 - EDIT_CATEGORY,
9 - DELETE_CATEGORY,
10 -} from "./CategoryQueries";
11 6
12 export default withRouter(({ location }) => { 7 export default withRouter(({ location }) => {
13 const { data } = useQuery(GET_CATEGORIRES); 8 const { data } = useQuery(GET_CATEGORIRES);
14 - const [addCategory] = useMutation(ADD_CATEGORY); 9 + //const [addCategory] = useMutation(ADD_CATEGORY);
15 - const [editCategory] = useMutation(EDIT_CATEGORY); 10 + //const [editCategory] = useMutation(EDIT_CATEGORY);
16 - const [deleteCategory] = useMutation(DELETE_CATEGORY); 11 + //const [deleteCategory] = useMutation(DELETE_CATEGORY);
17 12
18 let categories; 13 let categories;
19 if (data !== undefined) { 14 if (data !== undefined) {
......