UNPKG

@shopify/app-bridge-host

Version:

App Bridge Host contains middleware and components that are meant to be consumed by the app's host. The middleware and `Frame` component are responsible for facilitating messages posted between the client and host, and used to act on actions sent from the

28 lines (27 loc) 876 B
"use strict"; var __assign = (this && this.__assign) || function () { __assign = Object.assign || function(t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } return t; }; return __assign.apply(this, arguments); }; Object.defineProperty(exports, "__esModule", { value: true }); var actions_1 = require("./actions"); exports.defaultAppInfoStore = { hasCartPermission: false, }; function appInfoReducer(state, action) { if (state === void 0) { state = exports.defaultAppInfoStore; } switch (action.type) { case actions_1.SET_APP_INFO: return __assign({}, state, action.payload); default: return state; } } exports.default = appInfoReducer;