@sledge-app/react-instant-search 0.0.8 → 0.0.9

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.
@@ -736,9 +736,11 @@ const Trigger = (props) => {
736
736
  handleCheckWishlist();
737
737
  };
738
738
  }
739
- setIsRequiredLogin(localStorage.getItem(LOCAL_STORAGE_KEY.ANONYM_ID) && is_required_login);
740
739
  handleSettings(localStorage.getItem(LOCAL_STORAGE_KEY.WISHLIST_SETTING) || "");
741
740
  }, [isRenderApp]);
741
+ React__default.useEffect(() => {
742
+ setIsRequiredLogin(localStorage.getItem(LOCAL_STORAGE_KEY.ANONYM_ID) && is_required_login);
743
+ }, [localStorage.getItem(LOCAL_STORAGE_KEY.ANONYM_ID)]);
742
744
  React__default.useEffect(() => {
743
745
  handleCheckWishlist();
744
746
  }, [productVariantId]);
@@ -808,7 +810,7 @@ const WidgetHeaderClearTrigger = ({ buttonText, shareId, dataSettings, isFirstLo
808
810
  };
809
811
  React__default.useEffect(() => {
810
812
  setIsRequiredLogin(localStorage.getItem(LOCAL_STORAGE_KEY.ANONYM_ID) && is_required_login);
811
- }, []);
813
+ }, [localStorage.getItem(LOCAL_STORAGE_KEY.ANONYM_ID)]);
812
814
  const handleClick = () => {
813
815
  if (typeof window !== "undefined" && window.sledgeConfirmationPopup)
814
816
  window.sledgeConfirmationPopup({
@@ -958,7 +960,7 @@ const WidgetHeaderShareTrigger = ({ wishlistData, buttonText, showShareTrigger,
958
960
  };
959
961
  React__default.useEffect(() => {
960
962
  setIsRequiredLogin(localStorage.getItem(LOCAL_STORAGE_KEY.ANONYM_ID) && is_required_login);
961
- }, []);
963
+ }, [localStorage.getItem(LOCAL_STORAGE_KEY.ANONYM_ID)]);
962
964
  return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: !isRequiredLogin && /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: showShareTrigger && /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: isFirstLoading ? /* @__PURE__ */ jsxRuntimeExports.jsx(SkeletonLoading.Item, { width: "136px", height: "46px", color: "grey-100", rounded: "md" }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "sledge-wishlist__widget-header-item sledge-wishlist__widget-header-share-trigger", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
963
965
  Button,
964
966
  {
@@ -993,7 +995,7 @@ const WidgetHeaderSearchForm = ({ setIsLoading, setKeyword, keyword, placeholder
993
995
  };
994
996
  React__default.useEffect(() => {
995
997
  setIsRequiredLogin(localStorage.getItem(LOCAL_STORAGE_KEY.ANONYM_ID) && is_required_login);
996
- }, []);
998
+ }, [localStorage.getItem(LOCAL_STORAGE_KEY.ANONYM_ID)]);
997
999
  return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: !isRequiredLogin && /* @__PURE__ */ jsxRuntimeExports.jsx(
998
1000
  SearchInputField,
999
1001
  {
@@ -1037,7 +1039,7 @@ const WidgetHeaderLimit = ({ options, defaultLimitOptions, selectedLimit, setSel
1037
1039
  };
1038
1040
  React__default.useEffect(() => {
1039
1041
  setIsRequiredLogin(localStorage.getItem(LOCAL_STORAGE_KEY.ANONYM_ID) && is_required_login);
1040
- }, []);
1042
+ }, [localStorage.getItem(LOCAL_STORAGE_KEY.ANONYM_ID)]);
1041
1043
  return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: !isRequiredLogin && /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: getOptions && Boolean(getOptions == null ? void 0 : getOptions.length) && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "sledge-wishlist__widget-header-item", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
1042
1044
  SelectField,
1043
1045
  {
@@ -1063,7 +1065,7 @@ const WidgetHeaderSort$1 = ({ wishlistSort, selectedSort, setSelectedSort, setIs
1063
1065
  };
1064
1066
  React__default.useEffect(() => {
1065
1067
  setIsRequiredLogin(localStorage.getItem(LOCAL_STORAGE_KEY.ANONYM_ID) && is_required_login);
1066
- }, []);
1068
+ }, [localStorage.getItem(LOCAL_STORAGE_KEY.ANONYM_ID)]);
1067
1069
  return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: !isRequiredLogin && /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: wishlistSort && Boolean(wishlistSort == null ? void 0 : wishlistSort.length) && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "sledge-wishlist__widget-header-item", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
1068
1070
  SelectField,
1069
1071
  {