sdy

update CategoryContainer

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) {
......