mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-29 05:00:43 +10:00
Rename data to marketplaceData in Redux store
This commit is contained in:
parent
afe2389066
commit
20f263a7d7
8 changed files with 9 additions and 9 deletions
|
|
@ -146,7 +146,7 @@ EditListingPageComponent.propTypes = {
|
|||
|
||||
const mapStateToProps = state => {
|
||||
const page = state.EditListingPage;
|
||||
const marketplaceData = state.data || {};
|
||||
const marketplaceData = state.marketplaceData;
|
||||
const { currentUser } = state.user;
|
||||
return { page, marketplaceData, currentUser };
|
||||
};
|
||||
|
|
|
|||
|
|
@ -193,7 +193,7 @@ InboxPageComponent.propTypes = {
|
|||
};
|
||||
|
||||
const mapStateToProps = state => {
|
||||
const marketplaceData = state.data;
|
||||
const marketplaceData = state.marketplaceData;
|
||||
const {
|
||||
fetchInProgress,
|
||||
fetchOrdersOrSalesError,
|
||||
|
|
|
|||
|
|
@ -207,7 +207,7 @@ ListingPageComponent.propTypes = {
|
|||
};
|
||||
|
||||
const mapStateToProps = state => {
|
||||
const marketplaceData = state.data;
|
||||
const marketplaceData = state.marketplaceData;
|
||||
const { showListingError } = state.ListingPage;
|
||||
const { currentUser } = state.user;
|
||||
return { marketplaceData, showListingError, currentUser };
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ const mapStateToProps = state => {
|
|||
const { showListingError: showOrderError } = state.ListingPage;
|
||||
const { currentUser } = state.user;
|
||||
|
||||
const transactions = getEntities(state.data, transactionRef ? [transactionRef] : []);
|
||||
const transactions = getEntities(state.marketplaceData, transactionRef ? [transactionRef] : []);
|
||||
const transaction = transactions.length > 0 ? transactions[0] : null;
|
||||
|
||||
return { transaction, showOrderError, currentUser };
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ const mapStateToProps = state => {
|
|||
const { showListingError: showSaleError } = state.ListingPage;
|
||||
const { currentUser } = state.user;
|
||||
|
||||
const transactions = getEntities(state.data, transactionRef ? [transactionRef] : []);
|
||||
const transactions = getEntities(state.marketplaceData, transactionRef ? [transactionRef] : []);
|
||||
const transaction = transactions.length > 0 ? transactions[0] : null;
|
||||
|
||||
return { transaction, showSaleError, currentUser };
|
||||
|
|
|
|||
|
|
@ -173,7 +173,7 @@ const mapStateToProps = state => {
|
|||
searchParams,
|
||||
} = state.SearchPage;
|
||||
return {
|
||||
listings: getListingsById(state.data, currentPageResultIds),
|
||||
listings: getListingsById(state.marketplaceData, currentPageResultIds),
|
||||
pagination,
|
||||
searchInProgress,
|
||||
searchListingsError,
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import { reducer as form } from 'redux-form';
|
|||
import Auth from './Auth.duck';
|
||||
import FlashNotification from './FlashNotification.duck';
|
||||
import LocationFilter from './LocationFilter.duck';
|
||||
import sdkReducer from './marketplaceData.duck';
|
||||
import marketplaceData from './marketplaceData.duck';
|
||||
import user from './user.duck';
|
||||
|
||||
export { form, Auth, FlashNotification, LocationFilter, sdkReducer as data, user };
|
||||
export { form, Auth, FlashNotification, LocationFilter, marketplaceData, user };
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ const merge = (state, apiResponse) => {
|
|||
|
||||
const searchResults = payload => payload.data.data.map(listing => listing.id);
|
||||
|
||||
export default function sdkReducer(state = initialState, action = {}) {
|
||||
export default function marketplaceDataReducer(state = initialState, action = {}) {
|
||||
const { type, payload } = action;
|
||||
switch (type) {
|
||||
case SHOW_LISTINGS_REQUEST:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue