From d9918afa00d8d1725c732269bf2f024f4fb77cc4 Mon Sep 17 00:00:00 2001 From: farhantock Date: Tue, 18 Jun 2024 13:33:39 +0700 Subject: [PATCH] remove unused file --- src/appredux/modules/shipment/actions.js | 41 ----------------------- src/appredux/modules/shipment/reducers.js | 34 ------------------- 2 files changed, 75 deletions(-) delete mode 100644 src/appredux/modules/shipment/actions.js delete mode 100644 src/appredux/modules/shipment/reducers.js diff --git a/src/appredux/modules/shipment/actions.js b/src/appredux/modules/shipment/actions.js deleted file mode 100644 index ce04052..0000000 --- a/src/appredux/modules/shipment/actions.js +++ /dev/null @@ -1,41 +0,0 @@ - -export const SET_SHIPMENT_DATA = 'SET_SHIPMENT_DATA'; -export const SET_SELECTED_DROP_POINT = 'SET_SELECTED_DROP_POINT'; -export const SET_SELECTED_HISTORY = 'SET_SELECTED_HISTORY'; -export const SET_SHOW_HISTORY_PICTURE = 'SET_SHOW_HISTORY_PICTURE'; -export const SET_SELECTED_HISTORY_PICTURE = 'SET_SELECTED_HISTORY_PICTURE'; - -export const setShipmentData = obj => dispatch => { - dispatch({ - type: SET_SHIPMENT_DATA, - payload: obj - }) -} - -export const setSelectedDropPoint = obj => dispatch => { - dispatch({ - type: SET_SELECTED_DROP_POINT, - payload: obj - }) -} - -export const setSelectedHistory = obj => dispatch => { - dispatch({ - type: SET_SELECTED_HISTORY, - payload: obj - }) -} - -export const setShowHistoryPicture = obj => dispatch => { - dispatch({ - type: SET_SHOW_HISTORY_PICTURE, - payload: obj - }) -} - -export const setSelectedHistoryPicture = obj => dispatch => { - dispatch({ - type: SET_SELECTED_HISTORY_PICTURE, - payload: obj - }) -} \ No newline at end of file diff --git a/src/appredux/modules/shipment/reducers.js b/src/appredux/modules/shipment/reducers.js deleted file mode 100644 index c4c44de..0000000 --- a/src/appredux/modules/shipment/reducers.js +++ /dev/null @@ -1,34 +0,0 @@ -import { - SET_SHIPMENT_DATA, - SET_SELECTED_DROP_POINT, - SET_SELECTED_HISTORY, - SET_SHOW_HISTORY_PICTURE, - SET_SELECTED_HISTORY_PICTURE -} from "./actions"; - -const initialState = { - shipmentData: null, - selectedDropPoint: null, - selectedHistory: null, - showHistoryPicture: false, - selectedHistoryPicture: null -} - -function shipmentReducer(state = initialState, action) { - switch (action.type) { - case SET_SHIPMENT_DATA: - return { ...state, shipmentData: action.payload } - case SET_SELECTED_DROP_POINT: - return { ...state, selectedDropPoint: action.payload } - case SET_SELECTED_HISTORY: - return { ...state, selectedHistory: action.payload } - case SET_SHOW_HISTORY_PICTURE: - return { ...state, showHistoryPicture: action.payload } - case SET_SELECTED_HISTORY_PICTURE: - return { ...state, selectedHistoryPicture: action.payload } - default: - return state; - } -} - -export default shipmentReducer; \ No newline at end of file