{"size": 635, "ext": "js", "max_stars_repo_path": "source/store/userInfo/btnEditStore.js", "max_stars_repo_name": "vlev322/User_Profile_ALL", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "source/store/userInfo/btnEditStore.js", "max_issues_repo_name": "vlev322/User_Profile_ALL", "max_issues_repo_issues_event_min_datetime": "2021-03-08T23:36:44.000Z", "max_issues_repo_issues_event_max_datetime": "2022-02-26T08:18:44.000Z", "max_forks_repo_path": "source/store/userInfo/btnEditStore.js", "max_forks_repo_name": "vlev322/User_Profile_ALL", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 7, "max_forks_count": null, "avg_line_length": 17.1621621622, "max_line_length": 75, "alphanum_fraction": 0.5842519685}
import { createStore } from "redux";

const initialState = {
		edit: false
}

export const btnEditStore = createStore((state = initialState, action) => {
		switch (action.type) {

			case 'BTN_EDIT_USER':			
			return {
					...state,
					edit : action.edit
				};						
			case 'BTN_EDIT_USER_SHOW':			
			return {
					...state,
					edit : action.edit
				};						
		}
		return state;
	});

	// Edit User
	btnEditStore.btnEdit = () => {		
		btnEditStore.dispatch({
			type: 'BTN_EDIT_USER',
			edit: true
		})
	}
	btnEditStore.btnEditShow = () => {		
		btnEditStore.dispatch({
			type: 'BTN_EDIT_USER_SHOW',
			edit: false
		})
	}
