@fctc/widget-logic 1.2.2 → 1.2.4

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/hooks.js CHANGED
@@ -627,9 +627,7 @@ var AppProvider = ({ children }) => {
627
627
  return combineContexts([user.context, company.context]);
628
628
  }, [user.context, company.context]);
629
629
  const menu = useMenu({ context: menuContext });
630
- const action = (0, import_react10.useMemo)(() => {
631
- return menu.state.action;
632
- }, [menu.state.action]);
630
+ const action = (0, import_react10.useMemo)(() => menu.state.action, [menu.state.action]);
633
631
  const viewContext = (0, import_react10.useMemo)(() => {
634
632
  return combineContexts([
635
633
  menuContext,
@@ -658,15 +656,13 @@ var AppProvider = ({ children }) => {
658
656
  action,
659
657
  view
660
658
  },
661
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_interface_logic10.MainProvider, { children })
659
+ children
662
660
  }
663
661
  );
664
662
  };
665
663
  var useAppProvider = () => {
666
664
  const context = (0, import_react10.useContext)(ReactContext);
667
- if (!context) {
668
- return AppProviderInitialValue;
669
- }
665
+ if (!context) return AppProviderInitialValue;
670
666
  return context;
671
667
  };
672
668
 
package/dist/hooks.mjs CHANGED
@@ -612,9 +612,7 @@ var AppProvider = ({ children }) => {
612
612
  return combineContexts([user.context, company.context]);
613
613
  }, [user.context, company.context]);
614
614
  const menu = useMenu({ context: menuContext });
615
- const action = useMemo7(() => {
616
- return menu.state.action;
617
- }, [menu.state.action]);
615
+ const action = useMemo7(() => menu.state.action, [menu.state.action]);
618
616
  const viewContext = useMemo7(() => {
619
617
  return combineContexts([
620
618
  menuContext,
@@ -643,15 +641,13 @@ var AppProvider = ({ children }) => {
643
641
  action,
644
642
  view
645
643
  },
646
- children: /* @__PURE__ */ jsx(MainProvider, { children })
644
+ children
647
645
  }
648
646
  );
649
647
  };
650
648
  var useAppProvider = () => {
651
649
  const context = useContext(ReactContext);
652
- if (!context) {
653
- return AppProviderInitialValue;
654
- }
650
+ if (!context) return AppProviderInitialValue;
655
651
  return context;
656
652
  };
657
653