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

12 lines (11 loc) 545 B
import { useAppSelector } from '../app/hooks'; import { selectKioskApi, selectKioskConfig } from '../slices'; var Discount = function (_a) { var discount = _a.discount, children = _a.children, isSmall = _a.isSmall; var apiUrl = useAppSelector(selectKioskApi); var _b = useAppSelector(selectKioskConfig), config = _b.discount, cardConfig = _b.card; if (!config) return null; return children({ config: config, discount: discount, cardConfig: cardConfig, apiUrl: apiUrl, isSmall: isSmall }); }; export default Discount;