@open-tender/cloud 0.5.35 → 0.5.37

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.
@@ -20,8 +20,8 @@ exports.fetchStates = (0, toolkit_1.createAsyncThunk)('states/fetchStates', (_,
20
20
  const api = getState().config.api;
21
21
  if (!api)
22
22
  return null;
23
- const { data } = yield api.getStates();
24
- return data;
23
+ const states = yield api.getStates();
24
+ return states;
25
25
  }
26
26
  catch (err) {
27
27
  const error = err;
@@ -36,8 +36,8 @@ exports.fetchCitiesByState = (0, toolkit_1.createAsyncThunk)('states/fetchCities
36
36
  const api = getState().config.api;
37
37
  if (!api)
38
38
  return null;
39
- const { data } = yield api.getCitiesByState(state);
40
- return data;
39
+ const cities = yield api.getCitiesByState(state);
40
+ return cities;
41
41
  }
42
42
  catch (err) {
43
43
  const error = err;
@@ -52,8 +52,8 @@ exports.fetchHomeStoresByCity = (0, toolkit_1.createAsyncThunk)('states/fetchHom
52
52
  const api = getState().config.api;
53
53
  if (!api)
54
54
  return null;
55
- const { data } = yield api.getHomeStoresByCity(city);
56
- return data;
55
+ const homeStores = yield api.getHomeStoresByCity(city);
56
+ return homeStores;
57
57
  }
58
58
  catch (err) {
59
59
  const error = err;
@@ -17,8 +17,8 @@ export const fetchStates = createAsyncThunk('states/fetchStates', (_, { getState
17
17
  const api = getState().config.api;
18
18
  if (!api)
19
19
  return null;
20
- const { data } = yield api.getStates();
21
- return data;
20
+ const states = yield api.getStates();
21
+ return states;
22
22
  }
23
23
  catch (err) {
24
24
  const error = err;
@@ -33,8 +33,8 @@ export const fetchCitiesByState = createAsyncThunk('states/fetchCitiesByState',
33
33
  const api = getState().config.api;
34
34
  if (!api)
35
35
  return null;
36
- const { data } = yield api.getCitiesByState(state);
37
- return data;
36
+ const cities = yield api.getCitiesByState(state);
37
+ return cities;
38
38
  }
39
39
  catch (err) {
40
40
  const error = err;
@@ -49,8 +49,8 @@ export const fetchHomeStoresByCity = createAsyncThunk('states/fetchHomeStoresByC
49
49
  const api = getState().config.api;
50
50
  if (!api)
51
51
  return null;
52
- const { data } = yield api.getHomeStoresByCity(city);
53
- return data;
52
+ const homeStores = yield api.getHomeStoresByCity(city);
53
+ return homeStores;
54
54
  }
55
55
  catch (err) {
56
56
  const error = err;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-tender/cloud",
3
- "version": "0.5.35",
3
+ "version": "0.5.37",
4
4
  "description": "A library of hooks, reducers, utility functions, and types for use with Open Tender applications that utilize our cloud-based Order API.",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/esm/index.js",