@pack/react 0.0.13 → 0.0.14-canary.1
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render-sections.d.ts","sourceRoot":"","sources":["../src/render-sections.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6B,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"render-sections.d.ts","sourceRoot":"","sources":["../src/render-sections.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6B,MAAM,OAAO,CAAC;AA0ClD,wBAAgB,cAAc,CAAC,EAAE,OAAO,EAAE,EAAE,GAAG,4BA+B9C"}
|
package/dist/render-sections.js
CHANGED
|
@@ -5,6 +5,7 @@ import { sectionMap } from "./register-section";
|
|
|
5
5
|
import { storefrontSettingsSchema } from "./register-storefront-settings-schema";
|
|
6
6
|
function Sections({ sections }) {
|
|
7
7
|
const renderedSections = useMemo(() => {
|
|
8
|
+
console.log('DEBUG: sections', sections);
|
|
8
9
|
return sections
|
|
9
10
|
.map((section) => {
|
|
10
11
|
// TODO: Return a consistent data structure from the API and the customizer
|
|
@@ -15,6 +16,7 @@ function Sections({ sections }) {
|
|
|
15
16
|
data.dataSource = section.dataSource;
|
|
16
17
|
const schemaKey = data._template;
|
|
17
18
|
const Component = sectionMap.get(schemaKey);
|
|
19
|
+
console.log('DEBUG: Component', Component);
|
|
18
20
|
if (!Component)
|
|
19
21
|
return null;
|
|
20
22
|
return (React.createElement("section", { key: key, "data-comp": schemaKey, "data-comp-id": key, hidden: data?.sectionVisibility === "hidden" },
|
|
@@ -45,6 +47,7 @@ export function RenderSections({ content }) {
|
|
|
45
47
|
setPreviewStorefrontSettings({ settings: storefrontSettings });
|
|
46
48
|
}, [setPreviewStorefrontSettings, storefrontSettings]);
|
|
47
49
|
const sections = useMemo(() => {
|
|
50
|
+
console.log('DEBUG: liveContent', liveContent?.sections?.nodes || liveContent?.sections);
|
|
48
51
|
return liveContent?.sections?.nodes || liveContent?.sections;
|
|
49
52
|
}, [liveContent?.sections]);
|
|
50
53
|
if (!sections)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-customizer-shell.d.ts","sourceRoot":"","sources":["../src/use-customizer-shell.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,kBAAkB,mFAM5B,GAAG;;;
|
|
1
|
+
{"version":3,"file":"use-customizer-shell.d.ts","sourceRoot":"","sources":["../src/use-customizer-shell.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,kBAAkB,mFAM5B,GAAG;;;CAkIL,CAAC"}
|