diy-template-components 0.2.33 → 0.2.35

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.
package/build/index.js CHANGED
@@ -2,15 +2,15 @@
2
2
 
3
3
 
4
4
 
5
- function ___$insertStyle(css) {
6
- if (!css || typeof window === 'undefined') {
7
- return;
8
- }
9
- const style = document.createElement('style');
10
- style.setAttribute('type', 'text/css');
11
- style.innerHTML = css;
12
- document.head.appendChild(style);
13
- return css;
5
+ function ___$insertStyle(css) {
6
+ if (!css || !window) {
7
+ return;
8
+ }
9
+ const style = document.createElement('style');
10
+ style.setAttribute('type', 'text/css');
11
+ style.innerHTML = css;
12
+ document.head.appendChild(style);
13
+ return css;
14
14
  }
15
15
 
16
16
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -2286,39 +2286,27 @@ const NextImageRenderer = ({
2286
2286
  src,
2287
2287
  ...props
2288
2288
  }) => {
2289
- try {
2290
- const {
2291
- isCustomWebsite
2292
- } = React.useContext(PageContext);
2293
- let {
2294
- refSetter,
2295
- className
2296
- } = props;
2297
- if (isCustomWebsite) {
2298
- return /*#__PURE__*/React__default["default"].createElement(require.resolve('next/image').default, {
2299
- src: src,
2300
- // height: "640",
2301
- // width: "959",
2302
- layout: 'fill',
2303
- ref: {
2304
- refSetter
2305
- },
2306
- className: {
2307
- className
2308
- },
2309
- ...props
2310
- });
2311
- } else {
2312
- return /*#__PURE__*/React__default["default"].createElement("img", {
2313
- ref: refSetter,
2314
- className: className,
2315
- src: src
2316
- });
2317
- }
2318
- } catch (err) {
2319
- return {
2320
- notFound: true
2321
- };
2289
+ const {
2290
+ isCustomWebsite
2291
+ } = React.useContext(PageContext);
2292
+ let {
2293
+ refSetter,
2294
+ className
2295
+ } = props;
2296
+ if (isCustomWebsite) {
2297
+ const NextImage = require('next/image').default;
2298
+ return /*#__PURE__*/React__default["default"].createElement(NextImage, _extends({
2299
+ src: src,
2300
+ layout: 'fill',
2301
+ ref: refSetter,
2302
+ className: className
2303
+ }, props));
2304
+ } else {
2305
+ return /*#__PURE__*/React__default["default"].createElement("img", {
2306
+ ref: refSetter,
2307
+ className: className,
2308
+ src: src
2309
+ });
2322
2310
  }
2323
2311
  };
2324
2312