diff --git a/gatsby-browser.js b/gatsby-browser.js index 518323c..5184266 100644 --- a/gatsby-browser.js +++ b/gatsby-browser.js @@ -4,9 +4,9 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")); -var React = require('react'); +var React = require("react"); -var SnipcartProvider = require('./components/SnipcartProvider').default; +var SnipcartProvider = require("./components/SnipcartProvider").default; /** * wrapp app with provider for dispatch cart and customer infos */ @@ -20,10 +20,10 @@ exports.wrapRootElement = function (_ref, pluginOptions) { } var _options = (0, _extends2.default)({}, { - version: '3.0.15', + version: "3.0.19", locales: {}, - defaultLang: 'en' - }, pluginOptions); + defaultLang: "en" + }, {}, pluginOptions); return /*#__PURE__*/React.createElement(SnipcartProvider, _options, element); }; \ No newline at end of file diff --git a/gatsby-ssr.js b/gatsby-ssr.js index e4360e7..02c1678 100644 --- a/gatsby-ssr.js +++ b/gatsby-ssr.js @@ -26,10 +26,10 @@ exports.onRenderBody = function (_ref, pluginOptions) { } var _options = (0, _extends2.default)({}, { - version: "3.0.15", + version: "3.0.19", innerHTML: "", openCartOnAdd: true - }, pluginOptions); // find public api key in options plugin or environment variable + }, {}, pluginOptions); // find public api key in options plugin or environment variable var publicApiKey = GATSBY_SNIPCART_API_KEY || _options.publicApiKey; @@ -83,7 +83,7 @@ exports.wrapRootElement = function (_ref2, pluginOptions) { version: "3.0.15", locales: {}, defaultLang: "en" - }, pluginOptions); + }, {}, pluginOptions); return /*#__PURE__*/React.createElement(SnipcartProvider, _options, element); }; \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index edc5aa3..c3f283c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { - "name": "gatsby-plugin-snipcart-3", - "version": "1.0.0", + "name": "gatsby-plugin-snipcart-advanced", + "version": "1.0.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/store/index.js b/store/index.js index 7f7cdcb..2b9d167 100644 --- a/store/index.js +++ b/store/index.js @@ -24,27 +24,27 @@ exports.SnipcartContext = SnipcartContext; var reducer = function reducer(state, action) { switch (state, action.type) { case "setReady": - return (0, _extends2.default)({}, state, { + return (0, _extends2.default)({}, state, {}, { ready: action.payload }); case "setQuantity": - return (0, _extends2.default)({}, state, { + return (0, _extends2.default)({}, state, {}, { cartQuantity: action.payload }); case "setUserStatus": - return (0, _extends2.default)({}, state, { + return (0, _extends2.default)({}, state, {}, { userStatus: action.payload }); case "setTotal": - return (0, _extends2.default)({}, state, { + return (0, _extends2.default)({}, state, {}, { cartTotal: action.payload }); case "setSubTotal": - return (0, _extends2.default)({}, state, { + return (0, _extends2.default)({}, state, {}, { cartSubTotal: action.payload });