
/**
 * React Native Full App (https://store.enappd.com/product/react-native-full-app)
 *
 * Copyright © 2019-present Enappd. All rights reserved.
 *
 * This source code is licensed as per the terms found in the
 * LICENSE.md file in the root directory of this source tree.
 */
import { GET_SIMILAR_PRODUCTS } from "../types/ProductDetailsPage";

const INITIAL_STATE: ProductDetailsReducerState = {
    similarProducts: [],
  };

interface ProductDetailsReducerState {
  similarProducts: Array<any>;
}
  
  export default function (state = INITIAL_STATE, action:any): ProductDetailsReducerState {
    switch (action.type) {
      case GET_SIMILAR_PRODUCTS:
        return { ...state, similarProducts: action.payload };
      default :
        return state
    }
  };