diy-template-components 0.2.34 → 0.2.36

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.es.js CHANGED
@@ -1,17 +1,16 @@
1
- function ___$insertStyle(css) {
2
- if (!css || !window) {
3
- return;
4
- }
5
- const style = document.createElement('style');
6
- style.setAttribute('type', 'text/css');
7
- style.innerHTML = css;
8
- document.head.appendChild(style);
9
- return css;
1
+ function ___$insertStyle(css) {
2
+ if (!css || typeof window === 'undefined') {
3
+ return;
4
+ }
5
+ const style = document.createElement('style');
6
+ style.setAttribute('type', 'text/css');
7
+ style.innerHTML = css;
8
+ document.head.appendChild(style);
9
+ return css;
10
10
  }
11
11
 
12
12
  import React, { createContext, useContext, forwardRef, useRef, useEffect, useState, useMemo, useLayoutEffect, Suspense, memo, lazy, Fragment } from 'react';
13
13
  import Slider from 'react-slick';
14
- import Image from 'next/image';
15
14
  import axios from 'axios';
16
15
  import moment from 'moment';
17
16
  import Countdown from 'react-countdown';
@@ -1372,10 +1371,16 @@ const useSectionStyles$9 = createUseStyles(theme => ({
1372
1371
  upperContainerItem1: {
1373
1372
  width: '33%',
1374
1373
  display: 'flex',
1375
- justifyContent: 'flex-start',
1376
- '& img': {
1377
- maxHeight: '55px'
1378
- }
1374
+ justifyContent: 'flex-start'
1375
+
1376
+ // '& img': { maxHeight: '55px' }
1377
+ },
1378
+
1379
+ upperContainerItem1Img: {
1380
+ maxHeight: '55px',
1381
+ paddingBottom: '84px',
1382
+ position: 'relative',
1383
+ width: '33%'
1379
1384
  },
1380
1385
  upperContainerItem2: {
1381
1386
  width: '33%'
@@ -1509,6 +1514,34 @@ const useSectionStyles$9 = createUseStyles(theme => ({
1509
1514
  }
1510
1515
  }));
1511
1516
 
1517
+ const NextImageRenderer = ({
1518
+ src,
1519
+ ...props
1520
+ }) => {
1521
+ const {
1522
+ isCustomWebsite
1523
+ } = useContext(PageContext);
1524
+ let {
1525
+ refSetter,
1526
+ className
1527
+ } = props;
1528
+ if (isCustomWebsite) {
1529
+ const NextImage = require('next/image').default;
1530
+ return /*#__PURE__*/React.createElement(NextImage, _extends({
1531
+ src: src,
1532
+ layout: 'fill',
1533
+ ref: refSetter,
1534
+ className: className
1535
+ }, props));
1536
+ } else {
1537
+ return /*#__PURE__*/React.createElement("img", {
1538
+ ref: refSetter,
1539
+ className: className,
1540
+ src: src
1541
+ });
1542
+ }
1543
+ };
1544
+
1512
1545
  function Footer({
1513
1546
  data
1514
1547
  }) {
@@ -1521,10 +1554,12 @@ function Footer({
1521
1554
  className: classes.upperContainer
1522
1555
  }, /*#__PURE__*/React.createElement("div", {
1523
1556
  className: classes.upperContainerItem1
1524
- }, /*#__PURE__*/React.createElement("img", {
1557
+ }, /*#__PURE__*/React.createElement("div", {
1558
+ className: classes.upperContainerItem1Img
1559
+ }, /*#__PURE__*/React.createElement(NextImageRenderer, {
1525
1560
  src: data?.logo?.metadata?.url,
1526
1561
  ref: data?.logo?.refSetter
1527
- })), /*#__PURE__*/React.createElement("div", {
1562
+ }))), /*#__PURE__*/React.createElement("div", {
1528
1563
  className: classes.upperContainerItem2
1529
1564
  }, data?.address?.metadata.value && data?.address?.metadata.value !== '<br>' ? /*#__PURE__*/React.createElement("p", {
1530
1565
  className: classes.addressContainer
@@ -2268,41 +2303,6 @@ function Carousel({
2268
2303
  })));
2269
2304
  }
2270
2305
 
2271
- const NextImageRenderer = ({
2272
- src,
2273
- ...props
2274
- }) => {
2275
- const {
2276
- isCustomWebsite
2277
- } = useContext(PageContext);
2278
- let {
2279
- refSetter,
2280
- className
2281
- } = props;
2282
- if (isCustomWebsite) {
2283
- // return (React.createElement(require.resolve('next/image').default, {
2284
- // src: src,
2285
- // layout: 'fill',
2286
- // ref: { refSetter },
2287
- // className: { className },
2288
- // ...props
2289
- // });)
2290
-
2291
- return /*#__PURE__*/React.createElement(Image, _extends({
2292
- src: src,
2293
- layout: 'fill',
2294
- ref: refSetter,
2295
- className: className
2296
- }, props));
2297
- } else {
2298
- return /*#__PURE__*/React.createElement("img", {
2299
- ref: refSetter,
2300
- className: className,
2301
- src: src
2302
- });
2303
- }
2304
- };
2305
-
2306
2306
  function Section$4({
2307
2307
  nodeData
2308
2308
  }) {