@pack/react 0.0.13 → 0.0.14-canary.0

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;AAwClD,wBAAgB,cAAc,CAAC,EAAE,OAAO,EAAE,EAAE,GAAG,4BA8B9C"}
1
+ {"version":3,"file":"render-sections.d.ts","sourceRoot":"","sources":["../src/render-sections.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6B,MAAM,OAAO,CAAC;AAyClD,wBAAgB,cAAc,CAAC,EAAE,OAAO,EAAE,EAAE,GAAG,4BAiC9C"}
@@ -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('sections', sections);
8
9
  return sections
9
10
  .map((section) => {
10
11
  // TODO: Return a consistent data structure from the API and the customizer
@@ -26,6 +27,7 @@ function Sections({ sections }) {
26
27
  }
27
28
  export function RenderSections({ content }) {
28
29
  const { isPreview, setPreviewStorefrontSettings } = usePreviewContext();
30
+ console.log('test 123');
29
31
  const { content: liveContent, storefrontSettings } = useCustomizerShell({
30
32
  environment: "production",
31
33
  isPreview,
@@ -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('live content', 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;;;CAiIL,CAAC"}
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"}
@@ -93,6 +93,7 @@ export const useCustomizerShell = ({ environment = "production", isPreview, sect
93
93
  useEffect(() => {
94
94
  if (!isPreview)
95
95
  return;
96
+ console.log('refreshing sections');
96
97
  refreshSections();
97
98
  refreshStorefrontSettingsSchema();
98
99
  }, [
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pack/react",
3
3
  "description": "React",
4
- "version": "0.0.13",
4
+ "version": "0.0.14-canary.0",
5
5
  "exports": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
7
7
  "engines": {