UNPKG

@open-tender/store

Version:

A library of hooks, reducers, utility functions, and types for use with Open Tender applications that utilize our in-store POS API

23 lines (22 loc) 822 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var hooks_1 = require("../app/hooks"); var slices_1 = require("../slices"); var AccountSection = function (_a) { var title = _a.title, subtitle = _a.subtitle, path = _a.path, hasMore = _a.hasMore, navigate = _a.navigate, content = _a.content, children = _a.children, type = _a.type; var config = (0, hooks_1.useAppSelector)(slices_1.selectKioskConfig).accountSection; var view = function () { return navigate(path); }; var handlers = { view: view }; if (!config) return null; return children({ config: config, handlers: handlers, hasMore: hasMore, title: title, subtitle: subtitle, children: content, type: type }); }; exports.default = AccountSection;