@tecof/theme-editor 0.0.25 → 0.0.26
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/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -1
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +167 -57
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -545,8 +545,9 @@ var TecofPicture = React__default.memo(({
|
|
|
545
545
|
const { apiClient } = useTecof();
|
|
546
546
|
const cdnUrl = apiClient.cdnUrl;
|
|
547
547
|
if (!data3) return null;
|
|
548
|
+
const buildPath = (fileName) => data3?.folder && data3.folder !== "/" ? `${data3.folder.replace(/^\//, "")}/${fileName}` : fileName;
|
|
548
549
|
const isExternal = data3?.type === "external" || data3?.provider === "external";
|
|
549
|
-
const fileURL = isExternal ? data3?.url || "" : `${cdnUrl}/${data3?.name}`;
|
|
550
|
+
const fileURL = isExternal ? data3?.url || "" : `${cdnUrl}/${buildPath(data3?.name)}`;
|
|
550
551
|
const isImageType2 = isExternal ? true : isImage(data3?.type);
|
|
551
552
|
const isVideoType = isExternal ? false : isVideo(data3?.type);
|
|
552
553
|
if (!fileURL) return null;
|