diy-template-components 0.2.33 → 0.2.34
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 +38 -42
- package/build/index.es.js.map +1 -1
- package/build/index.js +39 -42
- package/build/index.js.map +1 -1
- package/package.json +2 -2
package/build/index.es.js
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
function ___$insertStyle(css) {
|
|
2
|
-
if (!css ||
|
|
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 || !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;
|
|
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';
|
|
14
15
|
import axios from 'axios';
|
|
15
16
|
import moment from 'moment';
|
|
16
17
|
import Countdown from 'react-countdown';
|
|
@@ -2271,39 +2272,34 @@ const NextImageRenderer = ({
|
|
|
2271
2272
|
src,
|
|
2272
2273
|
...props
|
|
2273
2274
|
}) => {
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
}
|
|
2303
|
-
} catch (err) {
|
|
2304
|
-
return {
|
|
2305
|
-
notFound: true
|
|
2306
|
-
};
|
|
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
|
+
});
|
|
2307
2303
|
}
|
|
2308
2304
|
};
|
|
2309
2305
|
|