@sonic-equipment/ui 0.0.115 → 0.0.116

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.
Files changed (2) hide show
  1. package/dist/index.js +8 -9
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -11008,13 +11008,6 @@ function useFetchCountriesWithLanguages({ enabled = true, } = { enabled: true })
11008
11008
  });
11009
11009
  }
11010
11010
 
11011
- function useUpdateLocale() {
11012
- return useMutation({
11013
- mutationFn: updateLocale,
11014
- throwOnError: true,
11015
- });
11016
- }
11017
-
11018
11011
  function useCookie(name, options) {
11019
11012
  const cookieValue = Cookies.get()[name];
11020
11013
  const [stateValue, setStateValue] = useState(cookieValue);
@@ -11063,7 +11056,6 @@ const cookieOptions = {
11063
11056
  };
11064
11057
  function useCountriesLanguages({ defaultCountryCode, defaultLanguageCode, }) {
11065
11058
  const [sessionCountries, setSessionCountries] = useSessionStorage('countries-v1');
11066
- const { mutate: updateLocale } = useUpdateLocale();
11067
11059
  const [currentCountryId] = useCookie('CurrentCountryId', cookieOptions);
11068
11060
  const [currentLanguageId] = useCookie('CurrentLanguageId', cookieOptions);
11069
11061
  const [contextLanguageCode] = useCookie('SetContextLanguageCode', cookieOptions);
@@ -11078,7 +11070,7 @@ function useCountriesLanguages({ defaultCountryCode, defaultLanguageCode, }) {
11078
11070
  // eslint-disable-next-line react-hooks/exhaustive-deps
11079
11071
  }, [apiCountries]);
11080
11072
  async function updateCountryLanguage({ country, language, }) {
11081
- updateLocale({ countryId: country.id, languageId: language.id });
11073
+ await updateLocale({ countryId: country.id, languageId: language.id });
11082
11074
  }
11083
11075
  if (error)
11084
11076
  throw error;
@@ -12474,6 +12466,13 @@ function useFetchSettings({ enabled = true, } = {}) {
12474
12466
  });
12475
12467
  }
12476
12468
 
12469
+ function useUpdateLocale() {
12470
+ return useMutation({
12471
+ mutationFn: updateLocale,
12472
+ throwOnError: true,
12473
+ });
12474
+ }
12475
+
12477
12476
  function useAddWishListItemToWishList() {
12478
12477
  const queryClient = useQueryClient();
12479
12478
  return useMutation({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sonic-equipment/ui",
3
- "version": "0.0.115",
3
+ "version": "0.0.116",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "engines": {