mirror of
				https://github.com/strapi/strapi.git
				synced 2025-11-03 19:36:20 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			24 lines
		
	
	
		
			503 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			24 lines
		
	
	
		
			503 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
/**
 | 
						|
 * 
 | 
						|
 * SettingPage reducer
 | 
						|
 */
 | 
						|
 | 
						|
import { fromJS } from 'immutable';
 | 
						|
import { ON_CLICK_EDIT_LIST_ITEM } from './constants';
 | 
						|
 | 
						|
const initialState = fromJS({
 | 
						|
  listItemToEdit: fromJS({}),
 | 
						|
  indexListItemToEdit: 0,
 | 
						|
});
 | 
						|
 | 
						|
function settingPageReducer(state = initialState, action) {
 | 
						|
  switch (action.type) {
 | 
						|
    case ON_CLICK_EDIT_LIST_ITEM:
 | 
						|
      return state
 | 
						|
        .update('listItemToEdit', () => fromJS(action.listItemToEdit));
 | 
						|
    default:
 | 
						|
      return state;
 | 
						|
  }
 | 
						|
}
 | 
						|
 | 
						|
export default settingPageReducer; |