@star-insure/sdk 3.1.1 → 3.1.3

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/sdk.esm.js CHANGED
@@ -2246,7 +2246,8 @@ function BackButton(_ref) {
2246
2246
 
2247
2247
  React__default.useEffect(function () {
2248
2248
  if (typeof window !== 'undefined') {
2249
- // Set back button URL
2249
+ if (!breadcrumbs) return; // Set back button URL
2250
+
2250
2251
  if (back && typeof back === 'boolean') {
2251
2252
  // If we haven't provided a path as a prop, use the last breadcrumb that's not the current one
2252
2253
  var crumb = breadcrumbs.slice(breadcrumbs.length - 2, breadcrumbs.length - 1);
@@ -2893,6 +2894,11 @@ function PageHeader(_ref) {
2893
2894
  checkScroll();
2894
2895
  }
2895
2896
 
2897
+ var filteredActions = React__default.useMemo(function () {
2898
+ return actions.filter(function (action) {
2899
+ return !action.hidden;
2900
+ });
2901
+ }, [actions]);
2896
2902
  return React__default.createElement("section", {
2897
2903
  className: cn('col-span-full max-w-full rounded-lg bg-white p-2 shadow', className)
2898
2904
  }, React__default.createElement("div", {
@@ -2929,13 +2935,13 @@ function PageHeader(_ref) {
2929
2935
  })), hasScroll && React__default.createElement(HiChevronRight, {
2930
2936
  onClick: clickRight,
2931
2937
  className: "w-5 h-5 text-gray-400 stroke-[1.25]"
2932
- }))), actions.length > 0 && React__default.createElement("div", {
2938
+ }))), filteredActions.length > 0 && React__default.createElement("div", {
2933
2939
  className: "flex items-center gap-3"
2934
2940
  }, filterOptions.length > 0 && React__default.createElement("div", {
2935
2941
  className: "w-[1px] h-full bg-gray-300"
2936
2942
  }), React__default.createElement("nav", {
2937
2943
  className: "flex items-center gap-2"
2938
- }, actions.map(function (action) {
2944
+ }, filteredActions.map(function (action) {
2939
2945
  return React__default.createElement(Action, Object.assign({
2940
2946
  key: action.title + "-" + action.as + "-" + action.href
2941
2947
  }, action));