{"version":3,"sources":["redux/actions/compareActions.js","redux/actions/BillingInfoActions.js","redux/actions/currencyActions.js","redux/actions/ProductReviewsActions.js","redux/actions/OrderActions.js","redux/actions/cartActions.js","redux/actions/ProductCatActions.js","redux/actions/productActions.js","redux/reducers/currencyReducer.js","redux/reducers/productReducer.js","redux/reducers/cartReducer.js","redux/reducers/wishlistReducer.js","redux/reducers/compareReducer.js","redux/reducers/LoginReducer.js","redux/reducers/BillingInfoReducer.js","redux/reducers/ProductReviewsReducers.js","redux/reducers/OrderReducer.js","redux/reducers/ProductCatReducer.js","redux/reducers/rootReducer.js","helpers/scroll-top.js","App.js","serviceWorker.js","index.js","redux/actions/wishlistActions.js","redux/actions/LoginActions.js"],"names":["ADD_TO_COMPARE","DELETE_FROM_COMPARE","addToCompare","item","addToast","dispatch","appearance","autoDismiss","type","payload","ADD_BILLING_INFO","DELETE_BILLING_INFO","addBillingInfo","bInfo","deleteBillingInfo","SET_CURRENCY","setCurrency","currencyName","rates","crates","currencyRate","rate","FETCH_PRODUCT_REVIEWS","axiosConfig","headers","FetchProductReviews","id","console","log","axios","get","process","then","res","data","pr","PR","SET_ORDER_NUMBER","setOrderNumber","orderId","ADD_TO_CART","DECREASE_QUANTITY","DELETE_FROM_CART","DELETE_ALL_FROM_CART","ADD_SELLER_MARGIN","GET_CART","FLUSH_CART_STATE","addToCart","quantityCount","selectedProductColor","selectedProductSize","sellerMargin","sellerId","selectedProductVarId","selectedProductSizeId","a","cart","cartItemId","productId","productVariationId","productVariationSizeId","cartQty","form_data","FormData","append","JSON","stringify","post","getCart","catch","error","response","status","quantity","decreaseQuantity","variation","VariationId","size","SizeId","deleteFromCart","axiosConfig_get","err","deleteAllFromCart","cartItemStock","color","stock","filter","single","name","addSellerMargin","SellerMargin","FinalUnitPrice","finalUnitPrice","flushCartState","initState","currencySymbol","currencyReducer","state","action","products","productReducer","cartReducer","cartItems","product","cartItem","map","wishlistReducer","wishlistItems","ADD_TO_WISHLIST","DELETE_FROM_WISHLIST","remainingItems","wishlistItem","DELETE_ALL_FROM_WISHLIST","GET_WISHLIST","compareReducer","compareItems","compareItem","undefined","user","LoginReducer","LOGIN_SELLER_SUCCESS","LOGOUT_SELLER_SUCCESS","UPDATE_SELLER_SUCCESS","DESTROY_SESSION","BillingInfo","BillingInfoReducer","ProductReviewsReducer","ProductReviews","orderReducer","productCat","productCatReducer","rootReducer","combineReducers","multilanguage","createMultilanguageReducer","currentLanguageCode","currencyData","productData","cartData","wishlistData","compareData","SellerUser","loginReducer","BillinginfoReducer","ProductReviewsReducers","Order","withRouter","props","useEffect","window","scrollTo","children","Home","lazy","Shop","OmoBrands","MenFashion","WomenFashion","HomenLifeStyle","Accessories","BabiesnToys","HealthnBeauty","Electronics","Product","ProductTabLeft","ProductTabRight","ProductSticky","ProductSlider","ProductFixedImage","Blog","About","Contact","MyAccount","Login","Register","Cart","Wishlist","Checkout","OrderConfirmation","ReturnPolicy","Privacy","Sizeguide","FAQs","verify","OrderTracking","ForgotPassword","ResetPassword","MyOrders","MyShares","MyEarnings","NotFound","connect","loginUser","loadLanguages","languages","en","require","fn","de","placement","fallback","className","exact","path","component","render","routeProps","key","match","params","Boolean","location","hostname","devTools","applyMiddleware","thunk","save","store","createStore","load","fetchProductsSuccess","config","ReactDOM","document","getElementById","navigator","serviceWorker","ready","registration","unregister","addToWishlist","wishlist","getWishList","deleteFromWishlist","deleteAllFromWishlist","LoginSellerSuccess","LoginSeller","SellerCredentials","LoginSellerUsingFB","accessToken","LogoutSeller","UpdateSeller","onClear"],"mappings":"kHAAA,sGAAO,IAAMA,EAAiB,iBACjBC,EAAsB,sBAGtBC,EAAe,SAACC,EAAMC,GACjC,OAAO,SAAAC,GACDD,GACFA,EAAS,mBAAoB,CAC3BE,WAAY,UACZC,aAAa,IAGjBF,EAAS,CAAEG,KAAMR,EAAgBS,QAASN,O,iCCZ9C,wIAAO,IAAMO,EAAmB,mBACnBC,EAAsB,sBAItBC,EAAiB,SAACC,GAC3B,OAAO,SAAAR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,SACpBD,EAAUE,OAAO,WAAYC,KAAKC,UAAU,CAAE,YAAe6K,KAC7DlN,IAAMsC,KAAKpC,6CAAuD+B,EAAWvC,GACxES,MAAK,SAAAC,GAAG,OAAIA,EAAIC,QAChBF,MAAK,SAAAsF,GACFjH,EAASsO,EAAmBrH,IAC5BlH,EAAS,oBAAqB,CAAEE,WAAY,UAAWC,aAAa,OAEvE8D,OAAM,SAAAC,QACoB+C,IAAnB/C,EAAMC,SACwB,MAA1BD,EAAMC,SAASC,QACfpE,EAAS,4BAA6B,CAAEE,WAAY,QAASC,aAAa,IAI9EH,EAAS,uBAAwB,CAAEE,WAAY,QAASC,aAAa,SAO5EyO,EAAe,SAACH,GACzB,OAAO,SAAAxO,GAGHA,EAjEmC,CACvCG,KAAMiH,EACNhH,QA+DiCoO,MAKxBI,EAAe,SAACJ,GACzB,OAAO,SAAAxO,GAGHA,EArEmC,CACvCG,KAAMkH,EACNjH,QAmEiCoO,MAIxBK,EAAU,WACnB,MAAO,CAAE1O,KAAMmH,M","file":"static/js/main.16663abc.chunk.js","sourcesContent":["export const ADD_TO_COMPARE = \"ADD_TO_COMPARE\";\r\nexport const DELETE_FROM_COMPARE = \"DELETE_FROM_COMPARE\";\r\n\r\n// add to compare\r\nexport const addToCompare = (item, addToast) => {\r\n return dispatch => {\r\n if (addToast) {\r\n addToast(\"Added To Compare\", {\r\n appearance: \"success\",\r\n autoDismiss: true\r\n });\r\n }\r\n dispatch({ type: ADD_TO_COMPARE, payload: item });\r\n };\r\n};\r\n\r\n// delete from compare\r\nexport const deleteFromCompare = (item, addToast) => {\r\n return dispatch => {\r\n if (addToast) {\r\n addToast(\"Removed From Compare\", {\r\n appearance: \"error\",\r\n autoDismiss: true\r\n });\r\n }\r\n dispatch({ type: DELETE_FROM_COMPARE, payload: item });\r\n };\r\n};\r\n","export const ADD_BILLING_INFO = \"ADD_BILLING_INFO\";\r\nexport const DELETE_BILLING_INFO = \"DELETE_BILLING_INFO\";\r\n\r\n\r\n// add Billing Info\r\nexport const addBillingInfo = (bInfo) => {\r\n return dispatch => {\r\n dispatch({ type: ADD_BILLING_INFO, payload: bInfo });\r\n };\r\n};\r\n\r\n//delete all from cart\r\nexport const deleteBillingInfo =() => {\r\n return dispatch => {\r\n dispatch({ type: DELETE_BILLING_INFO });\r\n };\r\n};\r\n\r\n","import crates from \"../../data/currencyrates-dummy.json\"\r\n//import axios from \"axios\";\r\nexport const SET_CURRENCY = \"SET_CURRENCY\";\r\n\r\n\r\nexport const setCurrency = currencyName => {\r\n return dispatch => {\r\n //axios\r\n // .get(`https://api.exchangeratesapi.io/latest?base=USD`)\r\n // .then(response => {\r\n // const rates = response.data.rates;\r\n // let currencyRate = 0;\r\n // for (const rate in rates) {\r\n // if (rate === currencyName) {\r\n // currencyRate = rates[rate];\r\n // }\r\n // }\r\n // dispatch({\r\n // type: SET_CURRENCY,\r\n // payload: { currencyName, currencyRate }\r\n // });\r\n //})\r\n //.catch(err => {\r\n // console.log(\"Error: \", err);\r\n //});\r\n\r\n const rates = crates.rates;\r\n let currencyRate = 0;\r\n for (const rate in rates) {\r\n if (rate === currencyName) {\r\n currencyRate = rates[rate];\r\n }\r\n }\r\n dispatch({\r\n type: SET_CURRENCY,\r\n payload: { currencyName, currencyRate }\r\n });\r\n //console.log(currencyName + \":\" +currencyRate)\r\n };\r\n};\r\n","import axios from 'axios';\r\n\r\n//export const ADD_PRODUCT_REVIEWES = \"ADD_PRODUCT_REVIEWES\";\r\nexport const FETCH_PRODUCT_REVIEWS = \"FETCH_PRODUCT_REVIEWS\";\r\n\r\n\r\n// add Product Reviews\r\n//export const AddProductReviewes = (review) => {\r\n// return dispatch => {\r\n// dispatch({ type: ADD_PRODUCT_REVIEWES });\r\n// };\r\n//};\r\n\r\n//fetch product reviwew\r\nexport const FetchProdReviewsSuccess = PR => {\r\n return dispatch => {\r\n dispatch({ type: FETCH_PRODUCT_REVIEWS, payload: PR });\r\n };\r\n};\r\n\r\n\r\nlet axiosConfig = {\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n \"Access-Control-Allow-Origin\": \"*\",\r\n }\r\n};\r\n//export const AddProduct_Review = (reviewjson) => {\r\n// return dispatch => {\r\n// //console.log('Login Ation');\r\n// axios.post(process.env.REACT_APP_ENDPOINT + \"api/Product/AddProduct_Reviews\", reviewjson, axiosConfig)\r\n// .then(res => res.data)\r\n// .then(rev => dispatch(AddProductReviewes(rev)));\r\n// };\r\n//};\r\n\r\nexport const FetchProductReviews = (id) => {\r\n console.log(id);\r\n return dispatch => {\r\n axios.get(process.env.REACT_APP_ENDPOINT + \"api/Product/GetProdReviewsByProdId?Id=\" + id, axiosConfig)\r\n .then(res => res.data)\r\n .then(pr => dispatch(FetchProdReviewsSuccess(pr)));\r\n };\r\n};\r\n\r\n\r\n\r\n","export const SET_ORDER_NUMBER = \"SET_ORDER_NUMBER\";\r\n//add to cart\r\nexport const setOrderNumber = (\r\n orderId\r\n) => {\r\n return dispatch => {\r\n //console.log(orderId+ \" from action\");\r\n dispatch({\r\n type: SET_ORDER_NUMBER,\r\n payload: {\r\n orderId\r\n }\r\n });\r\n };\r\n};","import axios from 'axios';\r\nexport const ADD_TO_CART = \"ADD_TO_CART\";\r\nexport const DECREASE_QUANTITY = \"DECREASE_QUANTITY\";\r\nexport const DELETE_FROM_CART = \"DELETE_FROM_CART\";\r\nexport const DELETE_ALL_FROM_CART = \"DELETE_ALL_FROM_CART\";\r\nexport const ADD_SELLER_MARGIN = \"ADD_SELLER_MARGIN\";\r\nexport const GET_CART = \"GET_CART\";\r\nexport const FLUSH_CART_STATE = \"FLUSH_CART_STATE\";\r\n\r\n\r\nlet axiosConfig = {\r\n headers: {\r\n 'Content-Type': 'multipart/form-data',\r\n \"Access-Control-Allow-Origin\": \"*\",\r\n }\r\n};\r\n//add to cart\r\nexport const addToCart = (\r\n item,\r\n addToast,\r\n quantityCount,\r\n selectedProductColor,\r\n selectedProductSize,\r\n sellerMargin,\r\n sellerId,\r\n selectedProductVarId,\r\n selectedProductSizeId\r\n) => {\r\n return async dispatch => {\r\n //////////////////////////////////////////\r\n const cart = {\r\n cartItemId: 0,\r\n sellerId: sellerId,\r\n productId: item.id,\r\n productVariationId: selectedProductVarId,//item.variation[0].VariationId,\r\n productVariationSizeId: selectedProductSizeId,//item.variation[0].size[0].SizeId,\r\n cartQty: quantityCount,\r\n sellerMargin: sellerMargin\r\n\r\n }\r\n //console.log(cart);\r\n let form_data = new FormData();\r\n form_data.append(\"cartJson\", JSON.stringify(cart));\r\n await axios.post(process.env.REACT_APP_ENDPOINT + \"api/cart/AddCartItems\", form_data, axiosConfig)\r\n .then(res => {\r\n\r\n if (res.data > 0) {\r\n //dispatch(LoginSellerSuccess(user));\r\n //addToast(\"Login Successfull\", { appearance: \"success\", autoDismiss: true });\r\n //console.log(\"cart item added with id\" + res.data );\r\n if (addToast) {\r\n addToast(\"Added To Cart\", { appearance: \"success\", autoDismiss: true });\r\n\r\n }\r\n return dispatch(getCart(sellerId));\r\n }\r\n })\r\n .catch(error => {\r\n if (error.response.status === 401) {\r\n addToast(\"something went wrong. please try again\", { appearance: \"error\", autoDismiss: true });\r\n //console.log(\"something went wrong from if\" + error.response.status);\r\n }\r\n else {\r\n console.log(\"something went wrong\" + error.response.status);\r\n }\r\n\r\n });\r\n //////////////////////////////////////////\r\n\r\n dispatch({\r\n type: ADD_TO_CART,\r\n payload: {\r\n ...item,\r\n quantity: quantityCount,\r\n selectedProductColor: selectedProductColor\r\n ? selectedProductColor\r\n : item.selectedProductColor\r\n ? item.selectedProductColor\r\n : null,\r\n selectedProductSize: selectedProductSize\r\n ? selectedProductSize\r\n : item.selectedProductSize\r\n ? item.selectedProductSize\r\n : null,\r\n sellerMargin\r\n }\r\n });\r\n\r\n\r\n };\r\n};\r\n//decrease from cart\r\nexport const decreaseQuantity = (item, addToast, sellerMargin, sellerId) => {\r\n return async dispatch => {\r\n //////////////////////////////////////////\r\n const cart = {\r\n cartItemId: 0,\r\n sellerId: sellerId,\r\n productId: item.id,\r\n productVariationId: item.variation[0].VariationId,\r\n productVariationSizeId: item.variation[0].size[0].SizeId,\r\n cartQty: -1,\r\n sellerMargin: sellerMargin\r\n\r\n }\r\n // console.log(cart);\r\n let form_data = new FormData();\r\n form_data.append(\"cartJson\", JSON.stringify(cart));\r\n await axios.post(process.env.REACT_APP_ENDPOINT + \"api/cart/AddCartItems\", form_data, axiosConfig)\r\n .then(res => {\r\n\r\n if (res.data > 0) {\r\n //dispatch(LoginSellerSuccess(user));\r\n //addToast(\"Login Successfull\", { appearance: \"success\", autoDismiss: true });\r\n //console.log(\"cart item added with id\" + res.data);\r\n if (addToast) {\r\n addToast(\"Item Decremented From Cart\", {\r\n appearance: \"warning\",\r\n autoDismiss: true\r\n });\r\n }\r\n return dispatch(getCart(sellerId));\r\n }\r\n else if (res.data < 0) {\r\n if (addToast) {\r\n addToast(\"Item Removed From Cart Due to Decrement\", {\r\n appearance: \"warning\",\r\n autoDismiss: true\r\n });\r\n }\r\n return dispatch(getCart(sellerId));\r\n }\r\n\r\n })\r\n .catch(error => {\r\n if (error.response.status === 401) {\r\n // addToast(\"something went wrong\", { appearance: \"error\", autoDismiss: true });\r\n console.log(\"something went wrong from if\" + error.response.status);\r\n }\r\n else {\r\n console.log(\"something went wrong\" + error.response.status);\r\n }\r\n\r\n });\r\n //////////////////////////////////////////\r\n\r\n dispatch({ type: DECREASE_QUANTITY, payload: item });\r\n };\r\n};\r\n//delete from cart\r\nexport const deleteFromCart = (item, addToast, sellerId) => {\r\n return async dispatch => {\r\n await axios.post(process.env.REACT_APP_ENDPOINT + \"api/cart/DeleteCartItemBySeller/\" + sellerId + \"/\" + item.cartItemId, axiosConfig_get)\r\n // await axios.delete(\"https://jsonplaceholder.typicode.com/posts/1\")\r\n .then((response) => {\r\n if (response.data === 1) {\r\n if (addToast) {\r\n addToast(\"Removed From Cart\", { appearance: \"error\", autoDismiss: true });\r\n }\r\n }\r\n return dispatch(getCart(sellerId));\r\n })\r\n .catch((err) => { console.log(err) });\r\n dispatch({ type: DELETE_FROM_CART, payload: item });\r\n };\r\n};\r\n//delete all from cart\r\nexport const deleteAllFromCart = (addToast, sellerId) => {\r\n\r\n return async dispatch => {\r\n await axios.post(process.env.REACT_APP_ENDPOINT + \"api/cart/DeleteCartItemBySeller/\" + sellerId)\r\n .then((response) => {\r\n if (response.data === 1) {\r\n if (addToast) {\r\n addToast(\"Removed All From Cart\", { appearance: \"error\", autoDismiss: true });\r\n }\r\n }\r\n return dispatch(getCart(sellerId));\r\n }).catch((err) => { console.log(err) });\r\n\r\n dispatch({ type: DELETE_ALL_FROM_CART });\r\n };\r\n};\r\n\r\n// get stock of cart item\r\nexport const cartItemStock = (item, color, size) => {\r\n if (item.stock) {\r\n return item.stock;\r\n } else {\r\n return item.variation\r\n .filter(single => single.color === color)[0]\r\n .size.filter(single => single.name === size)[0].stock;\r\n }\r\n};\r\n\r\n//add seller margin and final unit price (unit price+discount)\r\nexport const addSellerMargin = (\r\n item,\r\n //addToast,\r\n SellerMargin,\r\n FinalUnitPrice,\r\n sellerId\r\n\r\n) => {\r\n return dispatch => {\r\n //if (addToast) {\r\n // addToast(\"Seller Margin Added\", { appearance: \"success\", autoDismiss: true });\r\n //}\r\n dispatch({\r\n type: ADD_SELLER_MARGIN,\r\n payload: {\r\n ...item,\r\n sellerMargin: SellerMargin,\r\n finalUnitPrice: FinalUnitPrice\r\n }\r\n });\r\n };\r\n};\r\n////////////////////////////////\r\nlet axiosConfig_get = {\r\n headers: {\r\n //'Content-Type': 'multipart/form-data',\r\n 'Content-Type': 'application/json',\r\n \"Access-Control-Allow-Origin\": \"*\",\r\n }\r\n};\r\n////////////////////////////////\r\nexport const getCart = (sellerId) => {\r\n return async dispatch => {\r\n //Insert api call fro get cart\r\n await axios.get(process.env.REACT_APP_ENDPOINT + \"api/cart/GetCartBySeller?sellerId=\" + sellerId, axiosConfig_get)\r\n .then((response) => {\r\n //setData(response.data);\r\n //console.log(\"from get cart reducer\");\r\n dispatch({\r\n type: GET_CART,\r\n payload: response.data,\r\n //...item,\r\n //quantity: quantityCount,\r\n //selectedProductColor: selectedProductColor\r\n // ? selectedProductColor\r\n // : item.selectedProductColor\r\n // ? item.selectedProductColor\r\n // : null,\r\n //selectedProductSize: selectedProductSize\r\n // ? selectedProductSize\r\n // : item.selectedProductSize\r\n // ? item.selectedProductSize\r\n // : null,\r\n //sellerMargin\r\n\r\n });\r\n })\r\n .catch((err) => { console.log(err) });\r\n //////////////////////////////////////////////////////\r\n\r\n };\r\n}\r\n\r\nexport const flushCartState = () => {\r\n\r\n return dispatch => {\r\n dispatch({\r\n type: FLUSH_CART_STATE\r\n });\r\n };\r\n}\r\n\r\n\r\n","import axios from 'axios';\r\n\r\nexport const FETCH_PRODUCTCAT_SUCCESS = \"FETCH_PRODUCTCAT_SUCCESS\";\r\n\r\nconst fetchProductCatSuccess = productCat => ({\r\n type: FETCH_PRODUCTCAT_SUCCESS,\r\n payload: productCat\r\n});\r\n\r\n\r\nlet axiosConfig = {\r\n headers: {\r\n 'Content-Type': 'application/json;charset=UTF-8',\r\n \"Access-Control-Allow-Origin\": \"*\",\r\n }\r\n};\r\nexport const fetchProductCat = () => {\r\n return async dispatch => {\r\n await axios.get(process.env.REACT_APP_ENDPOINT + \"api/product/GetProductsCategory\", axiosConfig)\r\n\r\n .then((response) => {\n dispatch(fetchProductCatSuccess(response.data));\n //console.log(response.data);\n })\r\n .catch((err) => { console.log(err) });\r\n\r\n };\r\n};\n\n","import axios from 'axios';\r\nimport { fetchProductCat } from './ProductCatActions'\r\n\r\nexport const FETCH_PRODUCTS_SUCCESS = \"FETCH_PRODUCTS_SUCCESS\";\r\n\r\nconst fetchProductsSuccess = products => ({\r\n type: FETCH_PRODUCTS_SUCCESS,\r\n payload: products\r\n});\r\n \r\n// fetch products\r\n//export const fetchProducts = products => {\r\n// return dispatch => {\r\n// if (products)\r\n// dispatch(fetchProductsSuccess(products));\r\n// };\r\n//};\r\nlet axiosConfig = {\r\n headers: {\r\n 'Content-Type': 'application/json;charset=UTF-8',\r\n \"Access-Control-Allow-Origin\": \"*\",\r\n }\r\n};\r\nexport const fetchProducts =() => {\r\n return dispatch => {\r\n axios.get(process.env.REACT_APP_ENDPOINT + \"api/Seller/GetProducts\", axiosConfig)\r\n .then(res => res.data)\r\n .then(products => {\r\n dispatch(fetchProductsSuccess(products));\r\n dispatch(fetchProductCat());\r\n });\r\n \r\n };\r\n};\r\n","import { SET_CURRENCY } from \"../actions/currencyActions\";\r\n\r\nconst initState = {\r\n currencySymbol: \"Rs\",\r\n currencyName: \"PKR\",\r\n currencyRate: 1\r\n};\r\n\r\nconst currencyReducer = (state = initState, action) => {\r\n if (action.type === SET_CURRENCY) {\r\n const currencyName = action.payload.currencyName;\r\n\r\n if (currencyName === \"PKR\") {\r\n return {\r\n ...state,\r\n currencySymbol: \"Rs\",\r\n currencyRate: action.payload.currencyRate,\r\n currencyName\r\n };\r\n }\r\n if (currencyName === \"USD\") {\r\n return {\r\n ...state,\r\n currencySymbol: \"$\",\r\n currencyRate: action.payload.currencyRate,\r\n currencyName\r\n };\r\n }\r\n if (currencyName === \"EUR\") {\r\n return {\r\n ...state,\r\n currencySymbol: \"€\",\r\n currencyRate: action.payload.currencyRate,\r\n currencyName\r\n };\r\n }\r\n if (currencyName === \"GBP\") {\r\n return {\r\n ...state,\r\n currencySymbol: \"£\",\r\n currencyRate: action.payload.currencyRate,\r\n currencyName\r\n };\r\n }\r\n }\r\n\r\n return state;\r\n};\r\n\r\nexport default currencyReducer;\r\n"," import { FETCH_PRODUCTS_SUCCESS } from \"../actions/productActions\";\r\n\r\nconst initState = {\r\n products: []\r\n};\r\n\r\nconst productReducer = (state = initState, action) => {\r\n if (action.type === FETCH_PRODUCTS_SUCCESS) {\r\n return {\r\n ...state,\r\n products: action.payload\r\n };\r\n }\r\n\r\n return state;\r\n};\r\n\r\nexport default productReducer;\r\n","//import uuid from \"uuid/v4\";\r\nimport {\r\n ADD_TO_CART,\r\n DECREASE_QUANTITY,\r\n DELETE_FROM_CART,\r\n DELETE_ALL_FROM_CART,\r\n ADD_SELLER_MARGIN,\r\n GET_CART,\r\n FLUSH_CART_STATE\r\n} from \"../actions/cartActions\";\r\n\r\nconst initState = [];\r\n\r\nconst cartReducer = (state = initState, action) => {\r\n const cartItems = state,\r\n product = action.payload;\r\n\r\n if (action.type === ADD_TO_CART) {\r\n // for non variant products\r\n //if (product.variation === undefined) {\r\n // const cartItem = cartItems.filter(item => item.id === product.id)[0];\r\n // if (cartItem === undefined) {\r\n // return [\r\n // ...cartItems,\r\n // {\r\n // ...product,\r\n // quantity: product.quantity ? product.quantity : 1,\r\n // cartItemId: uuid(),\r\n // sellerMargin: product.sellerMargin\r\n\r\n // }\r\n // ];\r\n // } else {\r\n // return cartItems.map(item =>\r\n // item.cartItemId === cartItem.cartItemId\r\n // ? {\r\n // ...item,\r\n // quantity: product.quantity\r\n // ? item.quantity + product.quantity\r\n // : item.quantity + 1\r\n // }\r\n // : item\r\n // );\r\n // }\r\n // // for variant products\r\n //} else {\r\n // const cartItem = cartItems.filter(\r\n // item =>\r\n // item.id === product.id &&\r\n // product.selectedProductColor &&\r\n // product.selectedProductColor === item.selectedProductColor &&\r\n // product.selectedProductSize &&\r\n // product.selectedProductSize === item.selectedProductSize &&\r\n // (product.cartItemId ? product.cartItemId === item.cartItemId : true)\r\n // )[0];\r\n\r\n // if (cartItem === undefined) {\r\n // return [\r\n // ...cartItems,\r\n // {\r\n // ...product,\r\n // quantity: product.quantity ? product.quantity : 1,\r\n // cartItemId: uuid(),\r\n // sellerMargin: product.sellerMargin\r\n // }\r\n // ];\r\n // } else if (\r\n // cartItem !== undefined &&\r\n // (cartItem.selectedProductColor !== product.selectedProductColor ||\r\n // cartItem.selectedProductSize !== product.selectedProductSize)\r\n // ) {\r\n // return [\r\n // ...cartItems,\r\n // {\r\n // ...product,\r\n // quantity: product.quantity ? product.quantity : 1,\r\n // cartItemId: uuid(),\r\n // sellerMargin: product.sellerMargin\r\n // }\r\n // ];\r\n // } else {\r\n // return cartItems.map(item =>\r\n // item.cartItemId === cartItem.cartItemId\r\n // ? {\r\n // ...item,\r\n // quantity: product.quantity\r\n // ? item.quantity + product.quantity\r\n // : item.quantity + 1,\r\n // selectedProductColor: product.selectedProductColor,\r\n // selectedProductSize: product.selectedProductSize\r\n // }\r\n // : item\r\n // );\r\n // }\r\n //}\r\n }\r\n\r\n if (action.type === DECREASE_QUANTITY) {\r\n //if (product.quantity === 1) {\r\n // const remainingItems = (cartItems, product) =>\r\n // cartItems.filter(\r\n // cartItem => cartItem.cartItemId !== product.cartItemId\r\n // );\r\n // return remainingItems(cartItems, product);\r\n //} else {\r\n // return cartItems.map(item =>\r\n // item.cartItemId === product.cartItemId\r\n // ? { ...item, quantity: item.quantity - 1 }\r\n // : item\r\n // );\r\n //}\r\n }\r\n\r\n if (action.type === DELETE_FROM_CART) {\r\n //const remainingItems = (cartItems, product) =>\r\n // cartItems.filter(cartItem => cartItem.cartItemId !== product.cartItemId);\r\n //return remainingItems(cartItems, product);\r\n }\r\n\r\n if (action.type === DELETE_ALL_FROM_CART) {\r\n //return cartItems.filter(item => {\r\n // return false;\r\n //});\r\n }\r\n\r\n //add seller margin\r\n if (action.type === ADD_SELLER_MARGIN) {\r\n const cartItem = cartItems.filter(item => item.id === product.id)[0];\r\n\r\n return cartItems.map(item =>\r\n item.cartItemId === cartItem.cartItemId\r\n ? {\r\n ...item,\r\n sellerMargin: product.sellerMargin,\r\n finalUnitPrice: product.finalUnitPrice\r\n\r\n }\r\n : item\r\n );\r\n\r\n\r\n }\r\n\r\n //Get Cart from API\r\n if (action.type === GET_CART) {\r\n // console.log(\"from get cart reducer\");\r\n return action.payload;\r\n\r\n }\r\n\r\n //FLUSH_CART_STATE\r\n if (action.type === FLUSH_CART_STATE) {\r\n return cartItems.filter(item => {\r\n return false;\r\n });\r\n }\r\n\r\n return state;\r\n};\r\n\r\nexport default cartReducer;\r\n","import {\r\n ADD_TO_WISHLIST,\r\n DELETE_FROM_WISHLIST,\r\n DELETE_ALL_FROM_WISHLIST,\r\n GET_WISHLIST\r\n} from \"../actions/wishlistActions\";\r\n\r\nconst initState = [];\r\n\r\nconst wishlistReducer = (state = initState, action) => {\r\n const wishlistItems = state,\r\n product = action.payload;\r\n\r\n if (action.type === ADD_TO_WISHLIST) {\r\n //const wishlistItem = wishlistItems.filter(\r\n // item => item.id === product.id\r\n //)[0];\r\n //if (wishlistItem === undefined) {\r\n // return [...wishlistItems, product];\r\n //} else {\r\n // return wishlistItems;\r\n //}\r\n }\r\n\r\n if (action.type === DELETE_FROM_WISHLIST) {\r\n const remainingItems = (wishlistItems, product) =>\r\n wishlistItems.filter(wishlistItem => wishlistItem.id !== product.id);\r\n return remainingItems(wishlistItems, product);\r\n }\r\n\r\n if (action.type === DELETE_ALL_FROM_WISHLIST) {\r\n return wishlistItems.filter(item => {\r\n return false;\r\n });\r\n }\r\n //Get Cart from API\r\n if (action.type === GET_WISHLIST) {\r\n return action.payload;\r\n\r\n }\r\n return wishlistItems;\r\n};\r\n\r\nexport default wishlistReducer;\r\n","import { ADD_TO_COMPARE, DELETE_FROM_COMPARE } from \"../actions/compareActions\";\r\n\r\nconst initState = [];\r\n\r\nconst compareReducer = (state = initState, action) => {\r\n const compareItems = state,\r\n product = action.payload;\r\n\r\n if (action.type === ADD_TO_COMPARE) {\r\n const compareItem = compareItems.filter(item => item.id === product.id)[0];\r\n if (compareItem === undefined) {\r\n return [...compareItems, product];\r\n } else {\r\n return compareItems;\r\n }\r\n }\r\n\r\n if (action.type === DELETE_FROM_COMPARE) {\r\n const remainingItems = (compareItems, product) =>\r\n compareItems.filter(compareItem => compareItem.id !== product.id);\r\n return remainingItems(compareItems, product);\r\n }\r\n\r\n return compareItems;\r\n};\r\n\r\nexport default compareReducer;\r\n","import { LOGIN_SELLER_SUCCESS, LOGOUT_SELLER_SUCCESS, UPDATE_SELLER_SUCCESS, DESTROY_SESSION } from \"../actions/LoginActions\";\r\n\r\n\r\nconst initState = {\r\n user: ''\r\n \r\n};\r\n\r\nconst LoginReducer = (state = initState, action) => {\r\n if (action.type === LOGIN_SELLER_SUCCESS) {\r\n return {\r\n ...state,\r\n user: action.payload\r\n \r\n };\r\n }\r\n if (action.type === LOGOUT_SELLER_SUCCESS) {\r\n return {\r\n ...state,\r\n user: action.payload\r\n\r\n };\r\n }\r\n\r\n if (action.type === UPDATE_SELLER_SUCCESS) {\r\n return {\r\n ...state,\r\n user: action.payload \r\n\r\n };\r\n }\r\n\r\n if (action.type === DESTROY_SESSION)\r\n state = null;\r\n\r\n\r\n return state;\r\n};\r\n \r\nexport default LoginReducer;\r\n","import {\r\n ADD_BILLING_INFO,\r\n DELETE_BILLING_INFO\r\n} from \"../actions/BillingInfoActions\";\r\n\r\nconst initState = {\r\n BillingInfo: {}\r\n};\r\n\r\nconst BillingInfoReducer = (state = initState, action) => {\r\n\r\n if (action.type === ADD_BILLING_INFO) {\r\n return {\r\n ...state,\r\n BillingInfo : action.payload,\r\n }\r\n }\r\n if (action.type === DELETE_BILLING_INFO) {\r\n //return BillingInfo .filter(item => {\r\n // return false;\r\n //});\r\n return {\r\n ...state,\r\n BillingInfo: null,\r\n }\r\n }\r\n\r\nreturn state;\r\n};\r\n\r\nexport default BillingInfoReducer;\r\n","import { FETCH_PRODUCT_REVIEWS } from \"../actions/ProductReviewsActions\";\r\n\r\nconst initState = {};\r\n\r\nconst ProductReviewsReducer = (state = initState, action) => {\r\n\r\n if (action.type === FETCH_PRODUCT_REVIEWS) {\r\n return {\r\n ...state,\r\n ProductReviews: action.payload\r\n };\r\n }\r\n\r\n\r\n return state;\r\n};\r\n\r\nexport default ProductReviewsReducer;\r\n","import { SET_ORDER_NUMBER } from \"../actions/OrderActions\";\r\n\r\nconst initState = {\r\n orderId: 0\r\n};\r\n\r\nconst orderReducer = (state = initState, action) => {\r\n //console.log(action.payload + \" from reducer\");\r\n if (action.type === SET_ORDER_NUMBER) {\r\n return action.payload;\r\n\r\n \r\n }\r\n\r\n\r\n return state;\r\n};\r\n\r\nexport default orderReducer;","import { FETCH_PRODUCTCAT_SUCCESS } from \"../actions/ProductCatActions\";\r\n\r\nconst initState = {\r\n productCat: []\r\n};\r\n\r\nconst productCatReducer = (state = initState, action) => {\r\n if (action.type === FETCH_PRODUCTCAT_SUCCESS) {\r\n return {\n ...state,\r\n productCat: action.payload,\r\n };\r\n }\r\n\r\n return state;\r\n};\r\n\r\nexport default productCatReducer;\r\n","import currencyReducer from \"./currencyReducer\";\r\nimport productReducer from \"./productReducer\";\r\nimport cartReducer from \"./cartReducer\";\r\nimport wishlistReducer from \"./wishlistReducer\";\r\nimport compareReducer from \"./compareReducer\";\r\nimport loginReducer from \"./LoginReducer\";\r\nimport BillinginfoReducer from \"./BillingInfoReducer\"\r\nimport ProductReviewsReducers from './ProductReviewsReducers'\r\n//import AccountReducer from './AccountReducer'\r\nimport { combineReducers } from \"redux\";\r\nimport { createMultilanguageReducer } from \"redux-multilanguage\";\r\nimport orderReducer from \"./OrderReducer\";\r\nimport productCatReducer from './ProductCatReducer'\r\n\r\n\r\nconst rootReducer = combineReducers({\r\n multilanguage: createMultilanguageReducer({ currentLanguageCode: \"en\" }),\r\n currencyData: currencyReducer,\r\n productData: productReducer,\r\n cartData: cartReducer,\r\n wishlistData: wishlistReducer,\r\n compareData: compareReducer,\r\n SellerUser: loginReducer,\r\n BillingInfo: BillinginfoReducer,\r\n ProductReviews: ProductReviewsReducers,\r\n //SellerUser: AccountReducer\r\n Order: orderReducer,\r\n productCat: productCatReducer,\r\n});\r\n\r\n\r\nexport default rootReducer;\r\n","import { useEffect } from \"react\";\r\nimport { withRouter } from \"react-router-dom\";\r\n\r\nconst ScrollToTop = props => {\r\n useEffect(() => {\r\n window.scrollTo(0, 0);\r\n });\r\n return props.children;\r\n};\r\n\r\nexport default withRouter(ScrollToTop);\r\n","import PropTypes from \"prop-types\";\r\nimport React, { useEffect, Suspense, lazy } from \"react\";\r\nimport ScrollToTop from \"./helpers/scroll-top\";\r\nimport { BrowserRouter as Router, Switch, Route } from \"react-router-dom\";\r\nimport { ToastProvider } from \"react-toast-notifications\";\r\nimport { multilanguage, loadLanguages } from \"redux-multilanguage\";\r\nimport { connect } from \"react-redux\";\r\nimport { BreadcrumbsProvider } from \"react-breadcrumbs-dynamic\";\r\n\r\n// home pages\r\nconst Home = lazy(() => import(\"./pages/home/Home\"));\r\n// const HomeFashion = lazy(() => import(\"./pages/home/HomeFashion\"));\r\n// const HomeFashionTwo = lazy(() => import(\"./pages/home/HomeFashionTwo\"));\r\n// const HomeFashionThree = lazy(() => import(\"./pages/home/HomeFashionThree\"));\r\n// const HomeFashionFour = lazy(() => import(\"./pages/home/HomeFashionFour\"));\r\n// const HomeFashionFive = lazy(() => import(\"./pages/home/HomeFashionFive\"));\r\n// const HomeFashionSix = lazy(() => import(\"./pages/home/HomeFashionSix\"));\r\n// const HomeFashionSeven = lazy(() => import(\"./pages/home/HomeFashionSeven\"));\r\n// const HomeFashionEight = lazy(() => import(\"./pages/home/HomeFashionEight\"));\r\n// const HomeKidsFashion = lazy(() => import(\"./pages/home/HomeKidsFashion\"));\r\n// const HomeCosmetics = lazy(() => import(\"./pages/home/HomeCosmetics\"));\r\n// const HomeFurniture = lazy(() => import(\"./pages/home/HomeFurniture\"));\r\n// const HomeFurnitureTwo = lazy(() => import(\"./pages/home/HomeFurnitureTwo\"));\r\n// const HomeFurnitureThree = lazy(() =>\r\n// import(\"./pages/home/HomeFurnitureThree\")\r\n// );\r\n// const HomeFurnitureFour = lazy(() => import(\"./pages/home/HomeFurnitureFour\"));\r\n// const HomeFurnitureFive = lazy(() => import(\"./pages/home/HomeFurnitureFive\"));\r\n// const HomeFurnitureSix = lazy(() => import(\"./pages/home/HomeFurnitureSix\"));\r\n// const HomeFurnitureSeven = lazy(() =>\r\n// import(\"./pages/home/HomeFurnitureSeven\")\r\n// );\r\n// const HomeElectronics = lazy(() => import(\"./pages/home/HomeElectronics\"));\r\n// const HomeElectronicsTwo = lazy(() =>\r\n// import(\"./pages/home/HomeElectronicsTwo\")\r\n// );\r\n// const HomeElectronicsThree = lazy(() =>\r\n// import(\"./pages/home/HomeElectronicsThree\")\r\n// );\r\n// const HomeBookStore = lazy(() => import(\"./pages/home/HomeBookStore\"));\r\n// const HomeBookStoreTwo = lazy(() => import(\"./pages/home/HomeBookStoreTwo\"));\r\n// const HomePlants = lazy(() => import(\"./pages/home/HomePlants\"));\r\n// const HomeFlowerShop = lazy(() => import(\"./pages/home/HomeFlowerShop\"));\r\n// const HomeFlowerShopTwo = lazy(() => import(\"./pages/home/HomeFlowerShopTwo\"));\r\n// const HomeOrganicFood = lazy(() => import(\"./pages/home/HomeOrganicFood\"));\r\n// const HomeOrganicFoodTwo = lazy(() =>\r\n// import(\"./pages/home/HomeOrganicFoodTwo\")\r\n// );\r\n// const HomeOnepageScroll = lazy(() => import(\"./pages/home/HomeOnepageScroll\"));\r\n// const HomeGridBanner = lazy(() => import(\"./pages/home/HomeGridBanner\"));\r\n// const HomeAutoParts = lazy(() => import(\"./pages/home/HomeAutoParts\"));\r\n// const HomeCakeShop = lazy(() => import(\"./pages/home/HomeCakeShop\"));\r\n// const HomeHandmade = lazy(() => import(\"./pages/home/HomeHandmade\"));\r\n// const HomePetFood = lazy(() => import(\"./pages/home/HomePetFood\"));\r\n// const HomeMedicalEquipment = lazy(() =>\r\n// import(\"./pages/home/HomeMedicalEquipment\")\r\n// );\r\n// const HomeChristmas = lazy(() => import(\"./pages/home/HomeChristmas\"));\r\n// const HomeBlackFriday = lazy(() => import(\"./pages/home/HomeBlackFriday\"));\r\n// const HomeBlackFridayTwo = lazy(() =>\r\n// import(\"./pages/home/HomeBlackFridayTwo\")\r\n// );\r\n// const HomeValentinesDay = lazy(() => import(\"./pages/home/HomeValentinesDay\"));\r\n\r\n// shop pages\r\nconst Shop = lazy(() => import(\"./pages/shop/Shop\"));\r\nconst OmoBrands = lazy(() => import(\"./pages/shop/OmoBrands\"));\r\nconst MenFashion = lazy(() => import(\"./pages/shop/MenFashion\"));\r\nconst WomenFashion = lazy(() => import(\"./pages/shop/WomenFashion\"));\r\nconst HomenLifeStyle = lazy(() => import(\"./pages/shop/HomenLifeStyle\"));\r\nconst Accessories = lazy(() => import(\"./pages/shop/Accessories\"));\r\nconst BabiesnToys = lazy(() => import(\"./pages/shop/BabiesnToys\"));\r\nconst HealthnBeauty = lazy(() => import(\"./pages/shop/HealthnBeauty\"));\r\nconst Electronics = lazy(() => import(\"./pages/shop/Electronics\"));\r\n//const ComingSoon = lazy(() => import(\"./pages/shop/ComingSoon\"));\r\n// const ShopGridStandard = lazy(() => import(\"./pages/shop/ShopGridStandard\"));\r\n// const ShopGridFilter = lazy(() => import(\"./pages/shop/ShopGridFilter\"));\r\n// const ShopGridTwoColumn = lazy(() => import(\"./pages/shop/ShopGridTwoColumn\"));\r\n// const ShopGridNoSidebar = lazy(() => import(\"./pages/shop/ShopGridNoSidebar\"));\r\n// const ShopGridFullWidth = lazy(() => import(\"./pages/shop/ShopGridFullWidth\"));\r\n// const ShopGridRightSidebar = lazy(() =>\r\n// import(\"./pages/shop/ShopGridRightSidebar\")\r\n// );\r\n// const ShopListStandard = lazy(() => import(\"./pages/shop/ShopListStandard\"));\r\n// const ShopListFullWidth = lazy(() => import(\"./pages/shop/ShopListFullWidth\"));\r\n// const ShopListTwoColumn = lazy(() => import(\"./pages/shop/ShopListTwoColumn\"));\r\n\r\n// product pages\r\nconst Product = lazy(() => import(\"./pages/shop-product/Product\"));\r\nconst ProductTabLeft = lazy(() =>\r\n import(\"./pages/shop-product/ProductTabLeft\")\r\n);\r\nconst ProductTabRight = lazy(() =>\r\n import(\"./pages/shop-product/ProductTabRight\")\r\n);\r\nconst ProductSticky = lazy(() => import(\"./pages/shop-product/ProductSticky\"));\r\nconst ProductSlider = lazy(() => import(\"./pages/shop-product/ProductSlider\"));\r\nconst ProductFixedImage = lazy(() =>\r\n import(\"./pages/shop-product/ProductFixedImage\")\r\n);\r\n\r\n// blog pages\r\nconst Blog = lazy(() => import(\"./pages/blog/Blog\"));\r\n// const BlogStandard = lazy(() => import(\"./pages/blog/BlogStandard\"));\r\n// const BlogNoSidebar = lazy(() => import(\"./pages/blog/BlogNoSidebar\"));\r\n// const BlogRightSidebar = lazy(() => import(\"./pages/blog/BlogRightSidebar\"));\r\n// const BlogDetailsStandard = lazy(() =>\r\n// import(\"./pages/blog/BlogDetailsStandard\")\r\n// );\r\n\r\n// other pages\r\nconst About = lazy(() => import(\"./pages/other/About\"));\r\nconst Contact = lazy(() => import(\"./pages/other/Contact\"));\r\nconst MyAccount = lazy(() => import(\"./pages/other/MyAccount\"));\r\n//const LoginRegister = lazy(() => import(\"./pages/other/LoginRegister\"));\r\nconst Login = lazy(() => import(\"./pages/other/Login\"));\r\nconst Register = lazy(() => import(\"./pages/other/Register\"));\r\n\r\nconst Cart = lazy(() => import(\"./pages/other/Cart\"));\r\nconst Wishlist = lazy(() => import(\"./pages/other/Wishlist\"));\r\n//const Compare = lazy(() => import(\"./pages/other/Compare\"));\r\nconst Checkout = lazy(() => import(\"./pages/other/Checkout\"));\r\nconst OrderConfirmation = lazy(() => import(\"./pages/other/OrderConfirmation\"));\r\nconst ReturnPolicy = lazy(() => import(\"./pages/other/ReturnPolicy\"));\r\nconst Privacy = lazy(() => import(\"./pages/other/Privacy\"));\r\nconst Sizeguide = lazy(() => import(\"./pages/other/Sizeguide\"));\r\nconst FAQs = lazy(() => import(\"./pages/other/FAQs\"));\r\nconst verify = lazy(() => import(\"./pages/other/verify\"));\r\nconst OrderTracking = lazy(() => import(\"./pages/other/OrderTracking\"));\r\nconst ForgotPassword = lazy(() => import(\"./pages/other/ForgotPassword\"));\r\nconst ResetPassword = lazy(() => import(\"./pages/other/ResetPassword\"));\r\nconst MyOrders = lazy(() => import(\"./pages/other/MyOrders\"));\r\nconst MyShares = lazy(() => import(\"./pages/other/MyShares\"));\r\nconst MyEarnings = lazy(() => import(\"./pages/other/MyEarnings\"));\r\n\r\nconst NotFound = lazy(() => import(\"./pages/other/NotFound\"));\r\n\r\nconst App = (props) => {\r\n useEffect(() => {\r\n props.dispatch(\r\n loadLanguages({\r\n languages: {\r\n en: require(\"./translations/english.json\"),\r\n fn: require(\"./translations/french.json\"),\r\n de: require(\"./translations/germany.json\")\r\n }\r\n })\r\n );\r\n });\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n
\r\n \r\n }\r\n >\r\n \r\n \r\n\r\n {/* Homepages */}\r\n {/* \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n */}\r\n\r\n {/* Shop pages */}\r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n\r\n\r\n {/* \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n */}\r\n\r\n {/* Shop product pages */}\r\n (\r\n \r\n )}\r\n />\r\n \r\n \r\n \r\n \r\n \r\n\r\n {/* Blog pages */}\r\n \r\n {/* \r\n \r\n \r\n */}\r\n\r\n {/* Other pages */}\r\n \r\n \r\n \r\n {/**/}\r\n\r\n \r\n \r\n\r\n \r\n \r\n {/* */}\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n );\r\n};\r\n\r\nApp.propTypes = {\r\n dispatch: PropTypes.func,\r\n loginUser: PropTypes.object\r\n};\r\n\r\nconst mapStateToProps = state => {\r\n return {\r\n loginUser: state.SellerUser.user\r\n\r\n };\r\n};\r\n\r\nexport default connect(mapStateToProps)(multilanguage(App));\r\n","// This optional code is used to register a service worker.\r\n// register() is not called by default.\r\n\r\n// This lets the app load faster on subsequent visits in production, and gives\r\n// it offline capabilities. However, it also means that developers (and users)\r\n// will only see deployed updates on subsequent visits to a page, after all the\r\n// existing tabs open on the page have been closed, since previously cached\r\n// resources are updated in the background.\r\n\r\n// To learn more about the benefits of this model and instructions on how to\r\n// opt-in, read https://bit.ly/CRA-PWA\r\n\r\nconst isLocalhost = Boolean(\r\n window.location.hostname === \"localhost\" ||\r\n // [::1] is the IPv6 localhost address.\r\n window.location.hostname === \"[::1]\" ||\r\n // 127.0.0.1/8 is considered localhost for IPv4.\r\n window.location.hostname.match(\r\n /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\r\n )\r\n);\r\n\r\nexport function register(config) {\r\n if (process.env.NODE_ENV === \"production\" && \"serviceWorker\" in navigator) {\r\n // The URL constructor is available in all browsers that support SW.\r\n const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);\r\n if (publicUrl.origin !== window.location.origin) {\r\n // Our service worker won't work if PUBLIC_URL is on a different origin\r\n // from what our page is served on. This might happen if a CDN is used to\r\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\r\n return;\r\n }\r\n\r\n window.addEventListener(\"load\", () => {\r\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\r\n\r\n if (isLocalhost) {\r\n // This is running on localhost. Let's check if a service worker still exists or not.\r\n checkValidServiceWorker(swUrl, config);\r\n\r\n // Add some additional logging to localhost, pointing developers to the\r\n // service worker/PWA documentation.\r\n navigator.serviceWorker.ready.then(() => {\r\n console.log(\r\n \"This web app is being served cache-first by a service \" +\r\n \"worker. To learn more, visit https://bit.ly/CRA-PWA\"\r\n );\r\n });\r\n } else {\r\n // Is not localhost. Just register service worker\r\n registerValidSW(swUrl, config);\r\n }\r\n });\r\n }\r\n}\r\n\r\nfunction registerValidSW(swUrl, config) {\r\n navigator.serviceWorker\r\n .register(swUrl)\r\n .then(registration => {\r\n registration.onupdatefound = () => {\r\n const installingWorker = registration.installing;\r\n if (installingWorker == null) {\r\n return;\r\n }\r\n installingWorker.onstatechange = () => {\r\n if (installingWorker.state === \"installed\") {\r\n if (navigator.serviceWorker.controller) {\r\n // At this point, the updated precached content has been fetched,\r\n // but the previous service worker will still serve the older\r\n // content until all client tabs are closed.\r\n console.log(\r\n \"New content is available and will be used when all \" +\r\n \"tabs for this page are closed. See https://bit.ly/CRA-PWA.\"\r\n );\r\n\r\n // Execute callback\r\n if (config && config.onUpdate) {\r\n config.onUpdate(registration);\r\n }\r\n } else {\r\n // At this point, everything has been precached.\r\n // It's the perfect time to display a\r\n // \"Content is cached for offline use.\" message.\r\n console.log(\"Content is cached for offline use.\");\r\n\r\n // Execute callback\r\n if (config && config.onSuccess) {\r\n config.onSuccess(registration);\r\n }\r\n }\r\n }\r\n };\r\n };\r\n })\r\n .catch(error => {\r\n console.error(\"Error during service worker registration:\", error);\r\n });\r\n}\r\n\r\nfunction checkValidServiceWorker(swUrl, config) {\r\n // Check if the service worker can be found. If it can't reload the page.\r\n fetch(swUrl)\r\n .then(response => {\r\n // Ensure service worker exists, and that we really are getting a JS file.\r\n const contentType = response.headers.get(\"content-type\");\r\n if (\r\n response.status === 404 ||\r\n (contentType != null && contentType.indexOf(\"javascript\") === -1)\r\n ) {\r\n // No service worker found. Probably a different app. Reload the page.\r\n navigator.serviceWorker.ready.then(registration => {\r\n registration.unregister().then(() => {\r\n window.location.reload();\r\n });\r\n });\r\n } else {\r\n // Service worker found. Proceed as normal.\r\n registerValidSW(swUrl, config);\r\n }\r\n })\r\n .catch(() => {\r\n console.log(\r\n \"No internet connection found. App is running in offline mode.\"\r\n );\r\n });\r\n}\r\n\r\nexport function unregister() {\r\n if (\"serviceWorker\" in navigator) {\r\n navigator.serviceWorker.ready.then(registration => {\r\n registration.unregister();\r\n });\r\n }\r\n}\r\n","import \"react-app-polyfill/ie11\";\r\nimport \"react-app-polyfill/stable\";\r\nimport React from \"react\";\r\nimport ReactDOM from \"react-dom\";\r\nimport { createStore, applyMiddleware } from \"redux\";\r\nimport thunk from \"redux-thunk\";\r\nimport { save, load } from \"redux-localstorage-simple\"; //{clear }\r\nimport { Provider } from \"react-redux\";\r\nimport { fetchProducts } from \"./redux/actions/productActions\";\r\nimport rootReducer from \"./redux/reducers/rootReducer\";\r\n//import products from \"./data/Homeproducts.json\";\r\nimport App from \"./App\";\r\nimport \"./assets/scss/style.scss\";\r\nimport * as serviceWorker from \"./serviceWorker\";\r\n//import axios from 'axios';\r\n//import { setProductSession } from './Utils/Common';\r\nimport { composeWithDevTools } from \"redux-devtools-extension\";\r\n//import { initFacebookSdk } from './Utils/Common';\r\n\r\nconst devTools =\r\n process.env.NODE_ENV === \"production\"\r\n ? applyMiddleware(thunk, save())\r\n : composeWithDevTools(applyMiddleware(thunk, save()));\r\n//Clear the local storage\r\n//clear();\r\nconst store = createStore(\r\n rootReducer,\r\n load(),\r\n devTools\r\n);\r\n//composeWithDevTools(applyMiddleware(thunk, save()))\r\n\r\n//let axiosConfig = {\r\n// headers: {\r\n// 'Content-Type': 'application/json;charset=UTF-8',\r\n// \"Access-Control-Allow-Origin\": \"*\",\r\n// }\r\n//};\r\n//const config = {\r\n// headers: { Authorization: `Bearer ${getToken()}` }\r\n//};\r\n\r\n//const bodyParameters = {\r\n// key: \"value\"\r\n//};\r\n\r\n//const [data, setData] = React.useState('');\r\n\r\n//async function fetchData() {\r\n// const response = await axios.get(process.env.REACT_APP_ENDPOINT + \"api/Seller/GetProducts\", axiosConfig);\r\n// setProductSession(response.data);\r\n// // setProductSession(products);\r\n// //setData(response.data);\r\n//};\r\n\r\n//console.log(axios.get('api/seller/GetProducts')\r\n// .then(response => JSON.parse(response.data)));\r\n//fetchData();\r\n//console.log(getProductsSession());\r\n\r\n\r\n\r\n\r\n//useEffect(() => {\r\n\r\n// //const config = {\r\n// // headers: { Authorization: `Bearer ${getToken()}` }\r\n// //};\r\n// //const bodyParameters = {\r\n// // key: \"value\"\r\n// //};\r\n// //let results = axios.get('api/seller/GetProducts', bodyParameters, config);\r\n// //try {\r\n// // let response = JSON.parse(results.request.response)\r\n// // // dispatch({ type: Actions.RECEIVE_DATA, payload: response });\r\n// // console.log(response)\r\n// //} catch (err) {\r\n// // // dispatch({ type: Actions.FETCH_DATA_ERROR, payload: err });\r\n// //}\r\n// // .then(response => {\r\n\r\n// // dispatch({ type: Actions.RECEIVE_DATA, payload: response })\r\n\r\n// //}).catch(error => {\r\n// // setLoading(false);\r\n// // if (error.response.status === 401) setError(error.response.data.message);\r\n// // else setError(\"Something went wrong. Please try again later.\");\r\n// //});\r\n \r\n//});\r\n\r\n\r\n//componentDidMount() {\r\n \r\n// const config = {\r\n// headers: { Authorization: `Bearer ${getToken()}` }\r\n// };\r\n// const bodyParameters = {\r\n// key: \"value\"\r\n// };\r\n// let resaults = axios.get('api/seller/GetProducts', bodyParameters, config);\r\n// try {\r\n// let response = JSON.parse(results.request.response)\r\n// dispatch({ type: Actions.RECEIVE_DATA, payload: response });\r\n// } catch (err) {\r\n// dispatch({ type: Actions.FETCH_DATA_ERROR, payload: err });\r\n// }\r\n// // .then(response => {\r\n \r\n// // dispatch({ type: Actions.RECEIVE_DATA, payload: response })\r\n \r\n// //}).catch(error => {\r\n// // setLoading(false);\r\n// // if (error.response.status === 401) setError(error.response.data.message);\r\n// // else setError(\"Something went wrong. Please try again later.\");\r\n// //});\r\n//}\r\n// fetch products from json file\r\n//store.dispatch(fetchProducts(products));\r\n//fetch products from api\r\nstore.dispatch(fetchProducts()); //getProductsSession()\r\n\r\nrequire('dotenv').config()\r\n\r\n//initFacebookSdk().then(startApp);\r\n//function startApp() {\r\n ReactDOM.render(\r\n \r\n \r\n ,\r\n document.getElementById(\"root\")\r\n );\r\n // If you want your app to work offline and load faster, you can change\r\n // unregister() to register() below. Note this comes with some pitfalls.\r\n // Learn more about service workers: https://bit.ly/CRA-PWA\r\n serviceWorker.unregister();\r\n\r\n//}\r\n","\r\nimport axios from 'axios';\r\nexport const ADD_TO_WISHLIST = \"ADD_TO_WISHLIST\";\r\nexport const DELETE_FROM_WISHLIST = \"DELETE_FROM_WISHLIST\";\r\nexport const DELETE_ALL_FROM_WISHLIST = \"DELETE_ALL_FROM_WISHLIST\";\r\nexport const GET_WISHLIST = \"GET_WISHLIST\";\r\nlet axiosConfig = {\r\n headers: {\r\n 'Content-Type': 'multipart/form-data',\r\n \"Access-Control-Allow-Origin\": \"*\",\r\n }\r\n};\r\n// add to wishlist\r\nexport const addToWishlist = (item, addToast, sellerId, selectedProductVarId, selectedProductSizeId) => {\r\n\r\n return async dispatch => {\r\n const wishlist = {\r\n sellerId: sellerId,\r\n productId: item.id,\r\n productVariationId: selectedProductVarId ? selectedProductVarId : item.variation[0].VariationId,\r\n productVariationSizeId: selectedProductSizeId ? selectedProductSizeId : item.variation[0].size[0].SizeId\r\n }\r\n //console.log(wishlist);\r\n let form_data = new FormData();\r\n form_data.append(\"wishListJson\", JSON.stringify(wishlist));\r\n //console.log(JSON.stringify(wishlist));\r\n await axios.post(process.env.REACT_APP_ENDPOINT + \"api/WishList/AddWishListItems\", form_data, axiosConfig)\r\n .then(res => {\r\n if (res.data > 0) {\r\n if (addToast) {\r\n addToast(\"Added To Wishlist\", { appearance: \"success\", autoDismiss: true });\r\n\r\n }\r\n return dispatch(getWishList(sellerId));\r\n }\r\n else if (res.data === -1) {\r\n if (addToast) {\r\n addToast(\"Already in Wishlist\", { appearance: \"success\", autoDismiss: true });\r\n\r\n }\r\n return dispatch(getWishList(sellerId));\r\n }\r\n\r\n })\r\n .catch(error => {\r\n if (error.response.status === 401) {\r\n addToast(\"something went wrong. please try again\", { appearance: \"error\", autoDismiss: true });\r\n //console.log(\"something went wrong from if\" + error.response.status);\r\n }\r\n else {\r\n console.log(\"something went wrong\" + error.response.status);\r\n }\r\n\r\n });\r\n dispatch({ type: ADD_TO_WISHLIST, payload: item });\r\n }\r\n\r\n};\r\n\r\n\r\n// delete from wishlist\r\nexport const deleteFromWishlist = (item, addToast) => {\r\n return dispatch => {\r\n if (addToast) {\r\n addToast(\"Removed From Wishlist\", {\r\n appearance: \"error\",\r\n autoDismiss: true\r\n });\r\n }\r\n dispatch({ type: DELETE_FROM_WISHLIST, payload: item });\r\n };\r\n};\r\n\r\n//delete all from wishlist\r\nexport const deleteAllFromWishlist = addToast => {\r\n return dispatch => {\r\n if (addToast) {\r\n addToast(\"Removed All From Wishlist\", {\r\n appearance: \"error\",\r\n autoDismiss: true\r\n });\r\n }\r\n dispatch({ type: DELETE_ALL_FROM_WISHLIST });\r\n };\r\n};\r\n////////////////////////////////\r\nlet axiosConfig_get = {\r\n headers: {\r\n //'Content-Type': 'multipart/form-data',\r\n 'Content-Type': 'application/json',\r\n \"Access-Control-Allow-Origin\": \"*\",\r\n }\r\n};\r\n////////////////////////////////\r\n//get WishList\r\nexport const getWishList = (sellerId) => {\r\n return async dispatch => {\r\n //Insert api call fro get WishList\r\n await axios.get(process.env.REACT_APP_ENDPOINT + \"api/cart/GetWishListBySeller?sellerId=\" + sellerId, axiosConfig_get)\r\n .then((response) => {\r\n\r\n dispatch({\r\n type: GET_WISHLIST,\r\n payload: response.data,\r\n\r\n });\r\n })\r\n .catch((err) => { console.log(err) });\r\n //////////////////////////////////////////////////////\r\n\r\n };\r\n}\r\n","import axios from 'axios';\r\n\r\nexport const LOGIN_SELLER_SUCCESS = \"LOGIN_SELLER_SUCCESS\";\r\nexport const LOGOUT_SELLER_SUCCESS = \"LOGOUT_SELLER_SUCCESS\";\r\nexport const UPDATE_SELLER_SUCCESS = \"UPDATE_SELLER_SUCCESS\";\r\nexport const DESTROY_SESSION = \"destroy_session\";\r\n\r\nconst LoginSellerSuccess = SellerUser => ({\r\n type: LOGIN_SELLER_SUCCESS,\r\n payload: SellerUser\r\n});\r\n\r\n\r\nconst LogoutSellerSuccess = SellerUser => ({\r\n type: LOGOUT_SELLER_SUCCESS,\r\n payload: SellerUser\r\n});\r\n\r\nconst UpdateSellerSuccess = SellerUser => ({\r\n type: UPDATE_SELLER_SUCCESS,\r\n payload: SellerUser\r\n});\r\n\r\n\r\nlet axiosConfig = {\r\n headers: {\r\n 'Content-Type': 'multipart/form-data',\r\n \"Access-Control-Allow-Origin\": \"*\",\r\n }\r\n};\r\nexport const LoginSeller = (SellerCredentials, addToast) => {\r\n return dispatch => {\r\n //console.log('Login Ation');\r\n\r\n axios.post(process.env.REACT_APP_ENDPOINT + \"api/Seller/Login\", SellerCredentials, axiosConfig) //?UserName=\" + SellerCredentials.username + '&Password=' + SellerCredentials.password\r\n .then(res => res.data)\r\n .then(user => {\r\n dispatch(LoginSellerSuccess(user));\r\n addToast(\"Login Successfull\", { appearance: \"success\", autoDismiss: true });\r\n })\r\n .catch(error => {\r\n if (error.response.status === 401) {\r\n addToast(\"Invalid Login Credentials\", { appearance: \"error\", autoDismiss: true });\r\n }\r\n\r\n });\r\n };\r\n};\r\n\r\nexport const LoginSellerUsingFB = (accessToken, addToast) => {\r\n return dispatch => {\r\n //console.log(accessToken);\r\n var form_data = new FormData();\r\n form_data.append(\"jsondata\", JSON.stringify({ \"accessToken\": accessToken }));\r\n axios.post(process.env.REACT_APP_ENDPOINT + \"api/Seller/LoginFB\", form_data, axiosConfig)\r\n .then(res => res.data)\r\n .then(user => {\r\n dispatch(LoginSellerSuccess(user));\r\n addToast(\"Login Successfull\", { appearance: \"success\", autoDismiss: true });\r\n })\r\n .catch(error => {\r\n if (error.response !== undefined) {\r\n if (error.response.status === 401) {\r\n addToast(\"Invalid Login Credentials\", { appearance: \"error\", autoDismiss: true });\r\n }\r\n }\r\n else {\r\n addToast(\"Something went wrong\", { appearance: \"error\", autoDismiss: true });\r\n }\r\n\r\n });\r\n };\r\n};\r\n\r\nexport const LogoutSeller = (SellerCredentials) => {\r\n return dispatch => {\r\n // console.log('Logout Ation');\r\n // console.log(SellerCredentials);\r\n dispatch(LogoutSellerSuccess(SellerCredentials));\r\n };\r\n};\r\n\r\n\r\nexport const UpdateSeller = (SellerCredentials) => {\r\n return dispatch => {\r\n // console.log('Logout Ation');\r\n // console.log(SellerCredentials);\r\n dispatch(UpdateSellerSuccess(SellerCredentials));\r\n };\r\n};\r\n\r\nexport const onClear = () => {\r\n return { type: DESTROY_SESSION };\r\n};\r\n"],"sourceRoot":""}