@admin-layout/client 12.0.16-alpha.87 → 12.0.16-alpha.88

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,6 +1,6 @@
1
1
  export declare function useLayoutSettings(): {
2
2
  settings: any;
3
- setSettings: (config: any, changedSettings?: Record<string, any>) => Promise<any>;
3
+ setSettings: (config: any, currentChangedSetting?: Record<string, any>) => Promise<any>;
4
4
  getSettings: () => Promise<any>;
5
5
  };
6
6
  //# sourceMappingURL=useLayoutSettings.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useLayoutSettings.d.ts","sourceRoot":"","sources":["../../src/hooks/useLayoutSettings.ts"],"names":[],"mappings":"AAOA,wBAAgB,iBAAiB;;0BAgDV,GAAG,oBAAoB,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;;EA8DhE"}
1
+ {"version":3,"file":"useLayoutSettings.d.ts","sourceRoot":"","sources":["../../src/hooks/useLayoutSettings.ts"],"names":[],"mappings":"AAOA,wBAAgB,iBAAiB;;0BAgDV,GAAG,0BAA0B,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;;EA8DtE"}
@@ -35,11 +35,11 @@ import {useParams}from'@remix-run/react';import {useCallback}from'react';import
35
35
  return {};
36
36
  }
37
37
  }, []);
38
- const setSettings = useCallback(async (config, changedSettings) => {
39
- console.log('3️⃣ setSetting called', { config, changedSettings });
38
+ const setSettings = useCallback(async (config, currentChangedSetting) => {
39
+ console.log('3️⃣ setSetting called', { config, currentChangedSetting });
40
40
  try {
41
41
  // 1. Calculate payload first
42
- if (Object.keys(changedSettings).length === 0) {
42
+ if (!currentChangedSetting || Object.keys(currentChangedSetting).length === 0) {
43
43
  console.log('⏭️ No changes to persist');
44
44
  return;
45
45
  }
@@ -65,7 +65,7 @@ import {useParams}from'@remix-run/react';import {useCallback}from'react';import
65
65
  orgName: orgNameFromParams || orgNameFromUrl || '',
66
66
  },
67
67
  body: JSON.stringify({
68
- config: changedSettings,
68
+ config: currentChangedSetting,
69
69
  deviceType: getClientDeviceType(),
70
70
  }),
71
71
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@admin-layout/client",
3
- "version": "12.0.16-alpha.87",
3
+ "version": "12.0.16-alpha.88",
4
4
  "description": "Sample client for higher packages to depend on",
5
5
  "license": "ISC",
6
6
  "author": "CDMBase LLC",
@@ -44,5 +44,5 @@
44
44
  "typescript": {
45
45
  "definition": "lib/index.d.ts"
46
46
  },
47
- "gitHead": "2bba6a254488c1da0b941a314146a76446503735"
47
+ "gitHead": "63553231c260d401e80db1d2c96ccd6ecce4a5ea"
48
48
  }