Showing
1 changed file
with
8 additions
and
1 deletions
... | @@ -14,5 +14,12 @@ export default withRouter(({ location }) => { | ... | @@ -14,5 +14,12 @@ export default withRouter(({ location }) => { |
14 | const [addCategory] = useMutation(ADD_CATEGORY); | 14 | const [addCategory] = useMutation(ADD_CATEGORY); |
15 | const [editCategory] = useMutation(EDIT_CATEGORY); | 15 | const [editCategory] = useMutation(EDIT_CATEGORY); |
16 | const [deleteCategory] = useMutation(DELETE_CATEGORY); | 16 | const [deleteCategory] = useMutation(DELETE_CATEGORY); |
17 | - return <CategoryPresenter location={location} />; | 17 | + |
18 | + let categories; | ||
19 | + if (data !== undefined) { | ||
20 | + const { getCategories } = data; | ||
21 | + categories = getCategories; | ||
22 | + } | ||
23 | + | ||
24 | + return <CategoryPresenter location={location} categories={categories} />; | ||
18 | }); | 25 | }); | ... | ... |
-
Please register or login to post a comment