@open-tender/store 1.1.190 → 1.1.191

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,6 +7,7 @@ var CategoryNavItem = function (_a) {
7
7
  var index = _a.index, category = _a.category, children = _a.children, navigate = _a.navigate, scrollToIndex = _a.scrollToIndex;
8
8
  var dispatch = (0, hooks_1.useAppDispatch)();
9
9
  var apiUrl = (0, hooks_1.useAppSelector)(slices_1.selectKioskApi);
10
+ var display_category_nav_page = (0, hooks_1.useAppSelector)(slices_1.selectStoreSettings).display_category_nav_page;
10
11
  var current = (0, hooks_1.useAppSelector)(slices_1.selectCurrentCategory);
11
12
  var isCurrent = (current === null || current === void 0 ? void 0 : current.id) === category.id;
12
13
  var _b = (0, hooks_1.useAppSelector)(slices_1.selectKioskConfig), categoryNavItem = _b.categoryNavItem, categoryNavItemSelected = _b.categoryNavItemSelected;
@@ -19,7 +20,7 @@ var CategoryNavItem = function (_a) {
19
20
  scrollToIndex(index);
20
21
  }
21
22
  else {
22
- navigate('/menu/category');
23
+ navigate(display_category_nav_page ? '/menu/category' : '/menu');
23
24
  }
24
25
  };
25
26
  var handlers = { browse: browse };
@@ -1,10 +1,11 @@
1
1
  import { makeImageUrl } from '@open-tender/ui';
2
2
  import { useAppDispatch, useAppSelector } from '../app/hooks';
3
- import { selectCurrentCategory, selectKioskApi, selectKioskConfig, setCurrentCategory } from '../slices';
3
+ import { selectCurrentCategory, selectKioskApi, selectKioskConfig, selectStoreSettings, setCurrentCategory } from '../slices';
4
4
  var CategoryNavItem = function (_a) {
5
5
  var index = _a.index, category = _a.category, children = _a.children, navigate = _a.navigate, scrollToIndex = _a.scrollToIndex;
6
6
  var dispatch = useAppDispatch();
7
7
  var apiUrl = useAppSelector(selectKioskApi);
8
+ var display_category_nav_page = useAppSelector(selectStoreSettings).display_category_nav_page;
8
9
  var current = useAppSelector(selectCurrentCategory);
9
10
  var isCurrent = (current === null || current === void 0 ? void 0 : current.id) === category.id;
10
11
  var _b = useAppSelector(selectKioskConfig), categoryNavItem = _b.categoryNavItem, categoryNavItemSelected = _b.categoryNavItemSelected;
@@ -17,7 +18,7 @@ var CategoryNavItem = function (_a) {
17
18
  scrollToIndex(index);
18
19
  }
19
20
  else {
20
- navigate('/menu/category');
21
+ navigate(display_category_nav_page ? '/menu/category' : '/menu');
21
22
  }
22
23
  };
23
24
  var handlers = { browse: browse };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-tender/store",
3
- "version": "1.1.190",
3
+ "version": "1.1.191",
4
4
  "description": "A library of hooks, reducers, utility functions, and types for use with Open Tender applications that utilize our in-store POS API",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/esm/index.js",