sdy

set useQuery data

......@@ -14,5 +14,12 @@ export default withRouter(({ location }) => {
const [addCategory] = useMutation(ADD_CATEGORY);
const [editCategory] = useMutation(EDIT_CATEGORY);
const [deleteCategory] = useMutation(DELETE_CATEGORY);
return <CategoryPresenter location={location} />;
let categories;
if (data !== undefined) {
const { getCategories } = data;
categories = getCategories;
}
return <CategoryPresenter location={location} categories={categories} />;
});
......