diff --git a/com.twin.app.shoptime/src/actions/actionTypes.js b/com.twin.app.shoptime/src/actions/actionTypes.js index fe993c2b..2cc6e5a3 100644 --- a/com.twin.app.shoptime/src/actions/actionTypes.js +++ b/com.twin.app.shoptime/src/actions/actionTypes.js @@ -308,11 +308,7 @@ export const types = { SET_MODAL_BORDER: 'SET_MODAL_BORDER', SET_BANNER_VISIBILITY: 'SET_BANNER_VISIBILITY', - // πŸ”½ [μΆ”κ°€] JustForYou μƒν’ˆ 관리 λΆ€λΆ„ - GET_RECENTLY_SAW_ITEM: 'GET_RECENTLY_SAW_ITEM', - GET_LIKE_BRAND_PRODUCT: 'GET_LIKE_BRAND_PRODUCT', - GET_MORE_TO_CONCIDER_AT_THIS_PRICE: 'GET_MORE_TO_CONCIDER_AT_THIS_PRICE', - GET_JUSTFORYOU_INFO: 'GET_JUSTFORYOU_INFO', + // πŸ”½ [μΆ”κ°€] JustForYou μƒν’ˆ 관리 λΆ€λΆ„ JUSTFORYOU: 'JUSTFORYOU', // πŸ”½ Voice Conductor κ΄€λ ¨ μ•‘μ…˜ νƒ€μž… diff --git a/com.twin.app.shoptime/src/actions/forYouActions.js b/com.twin.app.shoptime/src/actions/forYouActions.js index 2caa8c99..18445341 100644 --- a/com.twin.app.shoptime/src/actions/forYouActions.js +++ b/com.twin.app.shoptime/src/actions/forYouActions.js @@ -1,60 +1,9 @@ import { URLS } from '../api/apiConfig'; import { TAxios } from '../api/TAxios'; -import { - curry, - get, - set, -} from '../utils/fp'; +import { get } from '../utils/fp'; import { types } from './actionTypes'; import { changeAppStatus } from './commonActions'; -// 졜근 λ³Έ μ•„μ΄ν…œ κ΄€λ ¨ μ•‘μ…˜ -export const getRecentlySawItem = (data) => ({ - type: types.GET_RECENTLY_SAW_ITEM, - payload: data, -}); - -// μ’‹μ•„ν•˜λŠ” λΈŒλžœλ“œ μ œν’ˆ κ΄€λ ¨ μ•‘μ…˜ -export const getLikeBrandProduct = (data) => ({ - type: types.GET_LIKE_BRAND_PRODUCT, - payload: data, -}); - -// 이 κ°€κ²©λŒ€μ—μ„œ κ³ λ €ν•  λ§Œν•œ 더 λ§Žμ€ μ œν’ˆ κ΄€λ ¨ μ•‘μ…˜ -export const getMoreToConciderAtThisPrice = (data) => ({ - type: types.GET_MORE_TO_CONCIDER_AT_THIS_PRICE, - payload: data, -}); - -export const getJustForYouInfo = (callback) => (dispatch, getState) => { - const onSuccess = (response) => { - console.log("getJustForYouInfo onSuccess", response.data); - dispatch({ - type: types.GET_JUSTFORYOU_INFO, - payload: get("data.data", response), - }); - dispatch(changeAppStatus({ showLoadingPanel: { show: false } })); - callback && callback(); - }; - - const onFail = (error) => { - console.error("getJustForYouInfo onFail", error); - dispatch(changeAppStatus({ showLoadingPanel: { show: false } })); - callback && callback(); - }; - - TAxios( - dispatch, - getState, - "get", - URLS.GET_JUSTFORYOU_INFO, - {}, - {}, - onSuccess, - onFail - ); -}; - export const justForYou = (callback) => (dispatch, getState) => { const macAddress = getState().common.macAddress; const macAddr = macAddress?.wired || macAddress?.wifi || "00:1A:2B:3C:4D:5E"; diff --git a/com.twin.app.shoptime/src/api/apiConfig.js b/com.twin.app.shoptime/src/api/apiConfig.js index 270e3f98..f37d181d 100644 --- a/com.twin.app.shoptime/src/api/apiConfig.js +++ b/com.twin.app.shoptime/src/api/apiConfig.js @@ -141,8 +141,7 @@ export const URLS = { UPDATE_ORDER_PARTIAL_CANCEL: "/lgsp/v1/myinfo/order/orderPartialCancel.lge", PAYMENT_TOTAL_CANCEL: "/lgsp/v1/myinfo/order/paymentTotalCancel.lge", - // foryou controller - GET_JUSTFORYOU_INFO: "/lgsp/v1/justforyou/list.lge", + // foryou controller JUSTFORYOU: "/lgsp/v1/recommend/justforyou.lge", diff --git a/com.twin.app.shoptime/src/reducers/forYouReducer.js b/com.twin.app.shoptime/src/reducers/forYouReducer.js index ffa540a3..bdd344c6 100644 --- a/com.twin.app.shoptime/src/reducers/forYouReducer.js +++ b/com.twin.app.shoptime/src/reducers/forYouReducer.js @@ -5,55 +5,15 @@ import { set, } from '../utils/fp'; -// 초기 μƒνƒœ μ •μ˜ -// const initialState = { -// recentlySawItems: [], -// likeBrandProducts: [], -// moreToConciderAtThisPrice: [], -// }; const initialState = { - justForYouInfo: {}, recommendInfo: {}, }; -// const foryouReducer = (state = initialState, action) => { -// switch (action.type) { -// // 졜근 λ³Έ μ•„μ΄ν…œ -// case types.GET_RECENTLY_SAW_ITEM: -// return { -// ...state, -// recentlySawItems: action.payload, -// }; - -// // μ’‹μ•„ν•˜λŠ” λΈŒλžœλ“œ μ œν’ˆ -// case types.GET_LIKE_BRAND_PRODUCT: -// return { -// ...state, -// likeBrandProducts: action.payload, -// }; - -// // 이 κ°€κ²©λŒ€μ—μ„œ κ³ λ €ν•  λ§Œν•œ 더 λ§Žμ€ μ œν’ˆ -// case types.GET_MORE_TO_CONCIDER_AT_THIS_PRICE: -// return { -// ...state, -// moreToConciderAtThisPrice: action.payload, -// }; - -// default: -// return state; -// } -// }; - -const justForYouInfo = curry((state, action) => - set("justForYouInfo", get("payload", action), state) -); - const recommendInfo = curry((state, action) => set("recommendInfo", get("payload", action), state) ); const handlers = { - [types.GET_JUSTFORYOU_INFO]: justForYouInfo, [types.JUSTFORYOU]: recommendInfo, }; diff --git a/com.twin.app.shoptime/src/views/HomePanel/SubCategory/SubCategory.jsx b/com.twin.app.shoptime/src/views/HomePanel/SubCategory/SubCategory.jsx index 16d31437..8a58ac48 100644 --- a/com.twin.app.shoptime/src/views/HomePanel/SubCategory/SubCategory.jsx +++ b/com.twin.app.shoptime/src/views/HomePanel/SubCategory/SubCategory.jsx @@ -16,7 +16,6 @@ import { import Spottable from '@enact/spotlight/Spottable'; import { setContainerLastFocusedElement } from '@enact/spotlight/src/container'; -import { getRecentlySawItem } from '../../../actions/forYouActions'; import { sendLogCuration } from '../../../actions/logActions'; import { getSubCategory } from '../../../actions/mainActions'; import { pushPanel } from '../../../actions/panelActions';